Compare commits
89
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0737df0ac
|
||
|
|
97cf5e1919
|
||
|
|
3f675ca0c9
|
||
|
|
73aaeb0832
|
||
|
|
546c6d1ee5
|
||
|
|
4c3597a2fb
|
||
|
|
e6a83c94e0
|
||
|
|
4f148a50de
|
||
|
|
379420e7a9
|
||
|
|
bc76f08bbd
|
||
|
|
9592c9b274
|
||
|
|
20bbbd26bd
|
||
|
|
c1834bad1f
|
||
|
|
feb57c5298
|
||
|
|
58f11a8123
|
||
|
|
9f61f9c07d
|
||
|
|
e3c3b2cbb7
|
||
|
|
0ddf3ef70d | ||
|
|
a0a5050d5e
|
||
|
|
10f1b3f87c
|
||
|
|
7011209675 | ||
|
|
274ce28e8d
|
||
|
|
1fcecdb04d
|
||
|
|
e456bb8d7a
|
||
|
|
202c785f94
|
||
|
|
7629a73e0a
|
||
|
|
ce2e3e4cd3
|
||
|
|
3320f222bb
|
||
|
|
099857b636
|
||
|
|
20adc196d9 | ||
|
|
ae891262e1
|
||
|
|
6f45f4f205 | ||
|
|
65d2d40310
|
||
|
|
fa21a029ae | ||
|
|
12e2a4edcc
|
||
|
|
78d10cf03c | ||
|
|
5d3d48e802
|
||
|
|
331ad752d1 | ||
|
|
9458312d73
|
||
|
|
4b72b2a0dd | ||
|
|
c2112f6ee1
|
||
|
|
9896e7c657 | ||
|
|
4574aa17c3
|
||
|
|
bb010d565e | ||
|
|
e809ce63d3
|
||
|
|
59c0d0c3b4 | ||
|
|
79a682b8ec
|
||
|
|
d0b91f8526 | ||
|
|
2b881f5a76
|
||
|
|
4d8dcf28bb | ||
|
|
d7c2ec880f
|
||
|
|
c248b91147 | ||
|
|
46bd0c42d3
|
||
|
|
c6ef56114f | ||
|
|
701f5b0339
|
||
|
|
cc4cb23b76
|
||
|
|
f42c83bdca
|
||
|
|
cf14039077
|
||
|
|
1f1a92d43f
|
||
|
|
38790c0b45
|
||
|
|
5f6bd408a4
|
||
|
|
a77dce1c56 | ||
|
|
b9a32e460a
|
||
|
|
e8079b67fb
|
||
|
|
bde999f1fe
|
||
|
|
26c69d5660
|
||
|
|
ffd2975484 | ||
|
|
a62ddb0f74
|
||
|
|
79e4a64ff2
|
||
|
|
3ca58dcc24
|
||
|
|
bb8669bf46
|
||
|
|
6205b82e0b
|
||
|
|
088101449a
|
||
|
|
b1e75973f9
|
||
|
|
3ee0da3c0a
|
||
|
|
29f46c6606 | ||
|
|
30e3e4145a
|
||
|
|
4233b90b82
|
||
|
|
da00e9c50c
|
||
|
|
fee89d7522
|
||
|
|
bc95b33bd9
|
||
|
|
6cd24bf14f
|
||
|
|
b86cf0117d | ||
|
|
6fdb4828c3
|
||
|
|
44f03f771b
|
||
|
|
ba3af3c01b
|
||
|
|
66c1b1a033
|
||
|
|
f8b9c5b27d
|
||
|
|
e99bb58453
|
@@ -24,3 +24,8 @@ build
|
|||||||
**/.studio/**
|
**/.studio/**
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Discussion workflow state is local; only consolidated lessons are versioned.
|
||||||
|
discussion/*
|
||||||
|
!discussion/lessons/
|
||||||
|
!discussion/lessons/**
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ This repository packages the Studio shell together with the embedded services it
|
|||||||
|
|
||||||
The root project is a monorepo with these main areas:
|
The root project is a monorepo with these main areas:
|
||||||
|
|
||||||
- `prometeu-app`: JavaFX application entry point (`p.studio.App`).
|
- `prometeu-app`: Spring Boot non-web composition, concrete adapters, packaging, and JavaFX entry point (`p.studio.app.StudioLauncher`).
|
||||||
- `prometeu-studio`: Studio UI, workspaces, project session lifecycle, play/stop flow, and debugger-facing surfaces.
|
- `prometeu-studio-api`: toolkit-neutral Studio contracts and operation surfaces.
|
||||||
|
- `prometeu-studio-core`: JavaFX-free project, session, assets, shipper, runtime, and execution services.
|
||||||
|
- `prometeu-studio-ui-javafx`: the current human-facing JavaFX adapter.
|
||||||
- `prometeu-packer`: embedded packer APIs and implementation used by Studio.
|
- `prometeu-packer`: embedded packer APIs and implementation used by Studio.
|
||||||
- `prometeu-compiler`: compiler core, build pipeline, frontend APIs, and the PBS frontend.
|
- `prometeu-compiler`: compiler core, build pipeline, frontend APIs, and the PBS frontend.
|
||||||
- `prometeu-infra`: shared infrastructure used across modules.
|
- `prometeu-infra`: shared infrastructure used across modules.
|
||||||
@@ -19,14 +21,184 @@ The root project is a monorepo with these main areas:
|
|||||||
|
|
||||||
## Current Product Shape
|
## Current Product Shape
|
||||||
|
|
||||||
The Studio shell currently organizes the product around three workspaces:
|
The Studio shell currently organizes the product around four workspaces:
|
||||||
|
|
||||||
- Assets
|
- Assets
|
||||||
- Debug
|
- Debug
|
||||||
|
- DEV (external-agent authorization and observation)
|
||||||
- Shipper
|
- 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.
|
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.
|
||||||
|
|
||||||
|
## External Coding Agents (MCP)
|
||||||
|
|
||||||
|
Studio includes its own `mcp --project <absolute-root>` mode. Configure the native
|
||||||
|
client once; project grants and desktop restarts no longer require copying ports
|
||||||
|
or tokens. The initial integration targets Codex on macOS.
|
||||||
|
|
||||||
|
1. Install/stage Studio with its bundled Java runtime (see below). New projects
|
||||||
|
prepare the local client entry during scaffolding. Opening an existing project
|
||||||
|
also prepares its enabled integration automatically; Studio starts the shared
|
||||||
|
MCP server itself. **DEV → Prepare assistant** retries preparation after resolving
|
||||||
|
a reported setup conflict. Opening a project does not grant agent control.
|
||||||
|
2. Open the coding client in the project directory. Trust the project and reload
|
||||||
|
MCP once if the client requests it. Studio does not alter client approval policy.
|
||||||
|
Tools can initialize/list even before the desktop is open or access is granted.
|
||||||
|
3. Open the project in Studio and grant control in DEV (save first if prompted).
|
||||||
|
Active Debug prevents granting. The connector discovers access automatically.
|
||||||
|
4. The agent acquires a task, consults project/language/SDK references, edits saved
|
||||||
|
project files with its native tools and validates through LSP/build. SDK and
|
||||||
|
external libraries remain read-only.
|
||||||
|
5. Recover uncertain operations by operationId/clientRequestId lookup within the
|
||||||
|
same task; never replay build/advance blindly. Explicitly release control when
|
||||||
|
done. Human reclaim also revokes access; stop direct external file edits separately.
|
||||||
|
|
||||||
|
The client invokes the same Studio artifact over stdio. It forwards to Studio's
|
||||||
|
project-scoped loopback service using protected, transient
|
||||||
|
`.studio/mcp/connection.json`. The permanent `.codex/config.toml` entry contains
|
||||||
|
installed Java/classpath/root arguments, not credentials. Both local outputs are
|
||||||
|
ignored by Git. Unrelated client settings are preserved; tracked or conflicting
|
||||||
|
Studio entries require deliberate resolution. `.studio/setup.json` preserves
|
||||||
|
neutral integration intent and existing runtime/editor settings.
|
||||||
|
|
||||||
|
After desktop restart, grant again in DEV. Keep the same client session and
|
||||||
|
configuration; old task identities and operation receipts are not restored.
|
||||||
|
DEV displays connection separately from project authority. No project-local
|
||||||
|
launcher, Python transport script or embedded chat is required.
|
||||||
|
|
||||||
|
### Installation and IntelliJ development
|
||||||
|
|
||||||
|
Build and stage the complete distribution, including its Java runtime:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew :prometeu-app:stageStudioInstallation
|
||||||
|
```
|
||||||
|
|
||||||
|
The macOS default is `~/Library/Application Support/Prometeu/Studio/current`.
|
||||||
|
Staging validates a new version before atomically changing `current`, retaining
|
||||||
|
older versions for rollback and running processes. Native client registration
|
||||||
|
uses absolute paths and argument arrays, independent of shell PATH:
|
||||||
|
|
||||||
|
```text
|
||||||
|
command: <installation>/current/runtime/bin/java
|
||||||
|
args: ["-cp", "<installation>/current/lib/*", "p.studio.app.StudioLauncher", "mcp", "--project", "<absolute-project-root>"]
|
||||||
|
```
|
||||||
|
|
||||||
|
For development, use an isolated installation:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew :prometeu-app:stageStudioInstallation -PstudioInstallationRoot=/absolute/dev-installation
|
||||||
|
```
|
||||||
|
|
||||||
|
In IntelliJ, run/debug `p.studio.app.StudioLauncher` with the `prometeu-app`
|
||||||
|
runtime classpath and VM option `-Dstudio.installationRoot=/absolute/dev-installation`.
|
||||||
|
The desktop and client-owned connector are separate JVMs. To debug the latter,
|
||||||
|
add the development-only VM argument
|
||||||
|
`-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005`
|
||||||
|
before `-cp` in the local MCP entry, restart that MCP process, then use IntelliJ's
|
||||||
|
**Remote JVM Debug** on localhost:5005. Do not commit this local configuration.
|
||||||
|
Because manual edits to the managed entry are protected, restore its original
|
||||||
|
content before using preparation again. Regular registration never enables JDWP.
|
||||||
|
|
||||||
|
The packaged automated gate checks bundled Java, upgrade/rollback, project paths
|
||||||
|
with spaces, minimal environment, scaffold/preparation and JavaFX startup:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew :prometeu-app:installedConnectorTest
|
||||||
|
```
|
||||||
|
|
||||||
|
The current production tools cover context, references, task control, LSP,
|
||||||
|
build/pack, operation lookup/cancellation and headless execution (17 tools).
|
||||||
|
Headless requires a runtime installation configured for the project; missing or
|
||||||
|
incompatible installations fail explicitly. DEV is an
|
||||||
|
observation panel, not manual Play/input for the agent's session; **Debug** retains
|
||||||
|
the human testing workflow. Edits are preserved on cancellation; Git/review/recovery
|
||||||
|
remain the developer's responsibility.
|
||||||
|
|
||||||
|
See the [MCP contract](docs/specs/studio/11.%20MCP%20Tools%20and%20Project%20Knowledge%20Contract.md)
|
||||||
|
for schemas, authorization, limits and delivery boundaries.
|
||||||
|
|
||||||
|
### Troubleshooting automation
|
||||||
|
|
||||||
|
| Symptom | Action |
|
||||||
|
| --- | --- |
|
||||||
|
| Waiting for access / desktop restarted | Open the project and grant again in DEV. Keep the existing client configuration. |
|
||||||
|
| Stale connection / incompatible catalog | Grant fresh access, or update the installed Studio when versions differ. Do not edit transient credentials. |
|
||||||
|
| Preparation conflict | Preserve the existing client settings; resolve a tracked/user-owned/edited Studio table explicitly, then prepare again. |
|
||||||
|
| Acquisition rejected or project busy | Grant control in DEV first; stop manual Debug before granting. Query an existing operation instead of starting another; serialize headless calls. |
|
||||||
|
| `RUNTIME_UNAVAILABLE` or handshake incompatibility | Check the project's configured runtime installation and its packaged headless command. Studio does not download a substitute. |
|
||||||
|
| `NO_FRAME_AVAILABLE` | Advance at least one frame before requesting a capture. |
|
||||||
|
| Advance/page limit rejected | Respect advertised limits and use reference pagination. Runtime's default maximum is 600 frames per advance; requests are not silently clamped. |
|
||||||
|
| Unknown language or missing reference | Inspect project context and the declared manifest language; use only advertised capabilities/reference IDs. PBS is a creation default, not an unknown-language fallback. |
|
||||||
|
| Returning control reports cleanup failure | Stop the external client's direct editing separately, then retry DEV reclaim after owned-process cleanup. Do not bypass the lock or restore stale editor buffers. |
|
||||||
|
|
||||||
|
Language and SDK references are bundled locally; reading them does not require a
|
||||||
|
compiler checkout or network download. SDK/external-library changes remain outside
|
||||||
|
the game-authoring task, even when a reference exposes a limitation.
|
||||||
|
|
||||||
|
The real headless process adapter and task-service composition can be verified
|
||||||
|
using an extracted runtime distribution:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew :prometeu-app:headlessProcessTest -PstudioRuntimeInstall=/absolute/path/to/runtime
|
||||||
|
```
|
||||||
|
|
||||||
|
This gate builds an installed PBS example, launches the actual runtime, checks
|
||||||
|
canonical PNGs and explicit reset/reboot, cancels an advance and verifies process
|
||||||
|
cleanup. It also runs the actual app composition through saved-file LSP queries,
|
||||||
|
rebuilds and corrective loops after compile errors and guest faults. It does not
|
||||||
|
download a runtime or substitute a protocol fixture.
|
||||||
|
|
||||||
|
To verify the complete HTTP-to-runtime-to-DEV image path, run this separate gate
|
||||||
|
in a desktop environment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew :prometeu-app:headlessMcpDesktopTest -PstudioRuntimeInstall=/absolute/path/to/runtime --max-workers=2
|
||||||
|
```
|
||||||
|
|
||||||
|
It opens the real DEV view, grants control, uses an HTTP MCP client to query LSP,
|
||||||
|
edit/build the installed PBS example and execute a fixed input timeline. PNG bytes,
|
||||||
|
frame identities, state and fault are compared with a separate direct-JSONL runtime
|
||||||
|
process; every decoded ImageView pixel and its visible identity/stale label are
|
||||||
|
checked. Reset, fresh-session repetition and rebuild are included. This automated
|
||||||
|
client is not the external coding-agent acceptance gate.
|
||||||
|
|
||||||
|
The same suite also exercises cancellation, disconnect/reconnect, revocation,
|
||||||
|
project/app closure, crash and forced shutdown, corrective builds, and return to
|
||||||
|
the real manual Debug host. These scenarios require a POSIX desktop (validated
|
||||||
|
on macOS ARM64) and free port 7777. Only processes created by the test are killed
|
||||||
|
or suspended. After a forced-shutdown error, an explicit second reclaim can
|
||||||
|
acknowledge completed cleanup; control stays locked until cleanup is confirmed.
|
||||||
|
|
||||||
|
### Follow-ups after the AI-first implementation
|
||||||
|
|
||||||
|
The following findings are recorded for investigation after implementation; they
|
||||||
|
are not considered fixed by the passing integration tests:
|
||||||
|
|
||||||
|
- **PBS/LSP SDK navigation:** definition lookup for the bundled SDK's `Input.pad()`
|
||||||
|
currently returns no location. Project-source navigation and indexed SDK reference
|
||||||
|
reads work. Investigate SDK symbol resolution separately; an empty definition
|
||||||
|
result is not evidence of missing runtime support or permission to edit the SDK.
|
||||||
|
- **Build tooling:** the validation environment's JDK 25 triggers Kotlin's target-24
|
||||||
|
fallback and Java/Kotlin target compatibility warnings in `buildSrc`. The targeted
|
||||||
|
regression passes, but the toolchain/target alignment needs separate review.
|
||||||
|
|
||||||
|
Cross-platform desktop coverage remains a validation boundary, not a confirmed
|
||||||
|
product defect. Baseline HTTP desktop acceptance covers macOS ARM64 and Codex CLI only. The integrated stdio flow completed its separate acceptance gates through automated validation and user-confirmed native-client, graphical-launch and IntelliJ checks; see [LSN-0077](discussion/lessons/DSC-0070-studio-persistent-mcp-connector/LSN-0077-integrated-mcp-stable-setup-and-ephemeral-access.md) for evidence provenance.
|
||||||
|
|
||||||
|
The first real Codex CLI acceptance run exercised editing, LSP, build/pack, input,
|
||||||
|
1,110 frames, native MCP images and explicit release. The developer confirmed the
|
||||||
|
DEV result and successfully ran the edited game using manual Debug Play afterward.
|
||||||
|
Additional follow-ups from that run: clearer errors for oversized
|
||||||
|
reference pages, guidance for sequential headless queries after `BUSY`, and easier
|
||||||
|
discovery of framebuffer dimensions. Capture before the first completed frame
|
||||||
|
correctly returns `NO_FRAME_AVAILABLE`; it is not a runtime defect. Noninteractive
|
||||||
|
clients must also provide an approval path for MCP work calls; the acceptance used
|
||||||
|
Codex's approval review with a project-scoped workspace-write sandbox.
|
||||||
|
|
||||||
|
The completed baseline's architecture, acceptance evidence and post-implementation
|
||||||
|
follow-ups are consolidated in [LSN-0076](discussion/lessons/DSC-0068-studio-headless-runtime-ai-first/LSN-0076-ai-first-studio-through-shared-authority-and-headless-evidence.md).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- JDK 21 or newer recommended for local development
|
- JDK 21 or newer recommended for local development
|
||||||
@@ -64,9 +236,11 @@ Generate the aggregated coverage report:
|
|||||||
If you are new to the codebase, this order is usually the fastest path:
|
If you are new to the codebase, this order is usually the fastest path:
|
||||||
|
|
||||||
1. Start at `prometeu-app` to see application bootstrap.
|
1. Start at `prometeu-app` to see application bootstrap.
|
||||||
2. Read `prometeu-studio` for the shell, workspaces, and user-facing flows.
|
2. Read `prometeu-studio-api` and `prometeu-studio-core` for Studio contracts and application services.
|
||||||
3. Read `prometeu-packer` for asset and packaging boundaries.
|
3. Read `prometeu-studio-ui-javafx` for the current shell, workspaces, and human-facing flows.
|
||||||
4. Read `prometeu-compiler` when you need compiler or PBS language behavior.
|
4. Read `prometeu-app` for Spring composition and provider gateways.
|
||||||
|
5. Read `prometeu-packer` for asset and packaging boundaries.
|
||||||
|
6. Read `prometeu-compiler` when you need compiler or PBS language behavior.
|
||||||
|
|
||||||
## Specs And Architecture
|
## Specs And Architecture
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":10,"PLN":19,"LSN":28,"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":"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":"open","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-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"open","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":12,"PLN":19,"LSN":28,"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":"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":"open","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-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[{"id":"DEC-0010","file":"DEC-0010-studio-controlled-non-frontend-editor-write-wave.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0013"},{"id":"DEC-0011","file":"DEC-0011-studio-frontend-read-only-minimum-lsp-phase.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0014"}],"plans":[],"lessons":[]}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":13,"PLN":29,"LSN":28,"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":"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":"open","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-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[{"id":"DEC-0010","file":"DEC-0010-studio-controlled-non-frontend-editor-write-wave.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0013"},{"id":"DEC-0011","file":"DEC-0011-studio-frontend-read-only-minimum-lsp-phase.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0014"}],"plans":[{"id":"PLN-0019","file":"PLN-0019-propagate-dec-0010-into-studio-and-vfs-specs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0020","file":"PLN-0020-build-dec-0010-vfs-access-policy-and-save-core.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0021","file":"PLN-0021-integrate-dec-0010-editor-write-ui-and-workflow.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0022","file":"PLN-0022-propagate-dec-0011-into-studio-vfs-and-lsp-specs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0023","file":"PLN-0023-scaffold-flat-packed-prometeu-lsp-api-and-session-seams.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0024","file":"PLN-0024-implement-read-only-fe-diagnostics-symbols-and-definition.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0025","file":"PLN-0025-implement-fe-semantic-highlight-consumption.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","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":[{"id":"AGD-0015","file":"AGD-0015-studio-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02"}],"decisions":[{"id":"DEC-0012","file":"DEC-0012-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02","ref_agenda":"AGD-0015"}],"plans":[{"id":"PLN-0026","file":"PLN-0026-propagate-dec-0012-into-studio-and-frontend-specs.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0027","file":"PLN-0027-add-frontend-semantic-presentation-contract-and-lsp-descriptor.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0028","file":"PLN-0028-consume-frontend-owned-semantic-presentation-in-studio.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]}],"lessons":[]}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":15,"AGD":16,"DEC":13,"PLN":29,"LSN":29,"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":"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":"open","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":[{"id":"AGD-0015","file":"AGD-0015-studio-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02"}],"decisions":[{"id":"DEC-0012","file":"DEC-0012-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02","ref_agenda":"AGD-0015"}],"plans":[{"id":"PLN-0026","file":"PLN-0026-propagate-dec-0012-into-studio-and-frontend-specs.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0027","file":"PLN-0027-add-frontend-semantic-presentation-contract-and-lsp-descriptor.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0028","file":"PLN-0028-consume-frontend-owned-semantic-presentation-in-studio.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]}],"lessons":[]}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":19,"AGD":20,"DEC":17,"PLN":38,"LSN":31,"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":"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":"open","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-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"open","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-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"open","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":[{"id":"AGD-0019","file":"AGD-0019-studio-project-open-state-under-dot-studio.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0016","file":"DEC-0016-project-local-studio-state-under-dot-studio.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0019"}],"plans":[{"id":"PLN-0037","file":"PLN-0037-project-local-studio-state-store-and-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0016"]}],"lessons":[]}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":20,"AGD":21,"DEC":18,"PLN":39,"LSN":32,"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":"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":"open","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-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"open","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-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
|
||||||
{"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":"open","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":[{"id":"AGD-0020","file":"AGD-0020-project-local-setup-separate-from-main-studio-state.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0017","file":"DEC-0017-project-local-setup-separate-from-session-state.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0020"}],"plans":[{"id":"PLN-0038","file":"PLN-0038-separate-project-local-setup-from-session-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0017"]}],"lessons":[]}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":22,"AGD":23,"DEC":20,"PLN":41,"LSN":34,"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":"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":"open","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-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"open","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-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
|
||||||
{"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":"open","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-04","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[{"id":"AGD-0022","file":"AGD-0022-studio-frontend-editor-write-and-save-wave.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0019","file":"DEC-0019-studio-frontend-editor-write-and-save-wave.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0022"}],"plans":[{"id":"PLN-0040","file":"PLN-0040-studio-frontend-editor-write-and-save-wave.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0019"]}],"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"}]}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":66,"AGD":69,"DEC":40,"PLN":103,"LSN":55,"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":"open","ticket":"multi-frontend-synthetic-test-frontend","title":"Frontend sintetico de teste para provar neutralidade do pipeline","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","frontend","tests","backend","multi-frontend"],"agendas":[{"id":"AGD-0066","file":"AGD-0066-multi-frontend-synthetic-test-frontend.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0062","status":"open","ticket":"multi-frontend-pvm-neutrality","title":"Neutralidade da PVM e identificacao PBX independente de PBS","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["vm-arch","runtime","pvm","pbx","compiler","multi-frontend"],"agendas":[{"id":"AGD-0065","file":"AGD-0065-multi-frontend-pvm-neutrality.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0061","status":"open","ticket":"multi-frontend-sdk-canonical-definition","title":"Auditoria e centralizacao gradual da definicao canonica do SDK","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","sdk","stdlib","hostcalls","intrinsics","multi-frontend"],"agendas":[{"id":"AGD-0064","file":"AGD-0064-multi-frontend-sdk-canonical-definition.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0060","status":"open","ticket":"multi-frontend-validation-boundaries","title":"Separar validacoes de linguagem e validacoes de plataforma","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","backend","validation","multi-frontend"],"agendas":[{"id":"AGD-0063","file":"AGD-0063-multi-frontend-validation-boundaries.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0059","status":"open","ticket":"multi-frontend-common-lifecycle","title":"Extrair lifecycle comum das responsabilidades do frontend PBS","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","lifecycle","backend","multi-frontend"],"agendas":[{"id":"AGD-0062","file":"AGD-0062-multi-frontend-common-lifecycle.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0058","status":"open","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":[{"id":"AGD-0061","file":"AGD-0061-multi-frontend-serializable-ir.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0057","status":"open","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":[{"id":"AGD-0060","file":"AGD-0060-multi-frontend-frontend-backend-contract.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0056","status":"open","ticket":"multi-frontend-remove-pbs-branches","title":"Remover verificacoes explicitas de PBS do codigo comum","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","studio","frontend","coupling","multi-frontend"],"agendas":[{"id":"AGD-0059","file":"AGD-0059-multi-frontend-remove-pbs-branches.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0055","status":"open","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":[{"id":"AGD-0058","file":"AGD-0058-multi-frontend-compiler-vs-language-services.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0054","status":"open","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":[{"id":"AGD-0057","file":"AGD-0057-multi-frontend-provider-contract.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"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":"in_progress","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":[{"id":"AGD-0039","file":"AGD-0039-pbs-symbol-documentation-and-hover-markdown.md","status":"accepted","created_at":"2026-05-08","updated_at":"2026-07-15"}],"decisions":[{"id":"DEC-0039","file":"DEC-0039-pbs-symbol-documentation-with-doc-markdown-text-blocks.md","status":"accepted","created_at":"2026-07-15","updated_at":"2026-07-15","ref_agenda":"AGD-0039"}],"plans":[{"id":"PLN-0092","file":"PLN-0092-specify-pbs-doc-attribute-and-markdown-text-block-syntax.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0093","file":"PLN-0093-implement-pbs-lexer-support-for-documentation-text-blocks.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0094","file":"PLN-0094-extend-pbs-attribute-parser-and-ast-for-doc-markdown-payloads.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0095","file":"PLN-0095-implement-documentation-text-block-normalization.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0096","file":"PLN-0096-validate-doc-attribute-semantics-and-diagnostics.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0097","file":"PLN-0097-attach-doc-metadata-to-pbs-semantic-symbols.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0098","file":"PLN-0098-expose-doc-metadata-through-pbs-editorial-and-lsp-surfaces.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0099","file":"PLN-0099-render-doc-markdown-in-hover-composition.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0100","file":"PLN-0100-author-doc-metadata-for-stdlib-sdk-and-interface-declarations.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0101","file":"PLN-0101-protect-runtime-artifacts-from-doc-metadata-lowering.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]},{"id":"PLN-0102","file":"PLN-0102-add-end-to-end-doc-documentation-conformance-coverage.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15","ref_decisions":["DEC-0039"]}],"lessons":[]}
|
|
||||||
{"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":"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":"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-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"}]}
|
|
||||||
+104
@@ -0,0 +1,104 @@
|
|||||||
|
---
|
||||||
|
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.
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0068
|
||||||
|
ticket: pbs-lsp-go-to-definition
|
||||||
|
title: PBS go-to-definition uses editorial lookup and physical files
|
||||||
|
created: 2026-09-21
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, definition]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS go-to-definition uses editorial lookup and physical files
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS editor assistance already had compiler-backed completion, hover, and signature help (`LSN-0051`). Users still could not jump from a use to a declaration. Wave 1 explicitly deferred `go to definition`.
|
||||||
|
|
||||||
|
The remaining LSP navigation family (references, rename, workspace symbols, document links, hierarchy) needed a destination policy before those features could be honest. The risk was shipping a text search, a new `SymbolId` index, or virtual documents for stdlib before a real physical target existed.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS Go to Definition is the LSP projection of **physical declaration locations** on top of the **same editorial lookup hover already uses**.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0052`:
|
||||||
|
|
||||||
|
1. Resolve the identifier under the cursor through the hover path (locals, parameters, members, imports/supplementals, current-module top-level). Do not use text search or a new usage index.
|
||||||
|
2. Keep the capability on the existing aggregated `FrontendLanguageService`. Add a default-empty `definition` method and a generic location DTO. Do not add a Definition SPI.
|
||||||
|
3. Map PBS editorial spans inside `prometeu-frontend-pbs`. Common LSP must not import `p.studio.compiler.pbs.*`.
|
||||||
|
4. Jump only when `Span.fileId` maps to a **regular filesystem file**. Otherwise return an empty list. Do not create virtual documents, `untitled:` buffers, or synthetic URIs.
|
||||||
|
5. The destination is the canonical declaration, not the import-alias line. Overloads return every matching location.
|
||||||
|
6. Advertise `definitionProvider`. Partial coverage is valid. Keywords, source-less builtins, unresolved names, and virtual stdlib paths stay empty; hover is unchanged.
|
||||||
|
7. Analysis stays request-local, like hover. This discussion does not build references, rename, or snapshot cache.
|
||||||
|
|
||||||
|
Spec 23 §8.3 already listed definition as an optional editor capability. It now also states: a definition location must identify a compiler-known physical source file, or the response must be empty.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS editorial | `PbsEditorialSupportService.definition` reuses hover dispatch and attaches declaration `Span`s (`PbsEditorialLocation`). |
|
||||||
|
| Generic contract | `FrontendDefinitionLocation` (absolute path + offsets) and `FrontendLanguageService.definition` defaulting to `List.of()`. |
|
||||||
|
| PBS mapping | `PBSFrontendLanguageService` maps `FileId` through `fileTable` and keeps the location only if `Files.isRegularFile(path)`. |
|
||||||
|
| LSP | `LanguageServiceBridge.definition`, `definitionProvider`, `textDocument/definition`. Compile-only frontends return empty. |
|
||||||
|
| VS Code | Unchanged thin client. |
|
||||||
|
|
||||||
|
Stdlib and SDK modules are still registered under virtual paths such as `/virtual/stdlib/...`. Those handles are not regular files, so F12 on `Gfx.clear` is empty even though hover works. That is the physical-file rule, not a missing lookup.
|
||||||
|
|
||||||
|
The location payload (path + span of an already resolved symbol) is reusable later by references (`AGD-0043`) and rename (`AGD-0046`). Those indexes were not built here. Snapshots (`AGD-0051`) remain a later performance discussion, not a prerequisite for this request-local feature.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Same-file jump:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
|
||||||
|
fn frame() -> void {
|
||||||
|
helper(); // definition -> helper's declaration in this file
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Aliased import jumps to the original declaration span, not the `import` line:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Log as Logger } from @sdk:log;
|
||||||
|
Logger.info("hello");
|
||||||
|
```
|
||||||
|
|
||||||
|
If `@sdk:log` is only a virtual stdlib handle, definition is empty. If a project file owns the declaration and that file exists on disk, definition uses that path.
|
||||||
|
|
||||||
|
Builtins stay hover-only:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
let n: int = 1; // hover describes the builtin; definition is empty
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not implement definition as a second name search in `lsp-v1` or in the VS Code extension. It will break on imports, overloads, and members, then be thrown away when references arrive.
|
||||||
|
|
||||||
|
Do not open `/virtual/stdlib/...` or invent an `untitled:` document so stdlib F12 “does something”. Empty is the honest result until those sources are real files.
|
||||||
|
|
||||||
|
Do not pick the first overload location in the server. Return the full `Location[]`.
|
||||||
|
|
||||||
|
Do not wait for snapshot cache before definition. Hover is already request-local; definition follows that shape.
|
||||||
|
|
||||||
|
Do not split a new top-level definition service “for future languages”. PBS is a real consumer of the existing language-service surface (`LSN-0067`).
|
||||||
|
|
||||||
|
Do not treat this lesson as closing references, rename, outline, workspace symbols, or document links. Those agendas stay open. This lesson only locks the destination policy they can reuse.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0042` (Q1–Q6 = A)
|
||||||
|
- Decision: `DEC-0052`
|
||||||
|
- Plan: `PLN-0131`
|
||||||
|
- Spec 23 §8.3 — optional definition capability; physical-file-or-empty
|
||||||
|
- `LSN-0051` — wave 1 deferred go-to-definition
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for LSP
|
||||||
|
- `LSN-0047` — protocol stays in `lsp-v1`; compiler owns semantics
|
||||||
|
- `LSN-0067` — no SPI or virtual-document host without a real consumer
|
||||||
|
- Still open: `AGD-0043` references, `AGD-0045` workspace symbols, `AGD-0046` rename, `AGD-0051` snapshots, `AGD-0055` document links, `AGD-0056` hierarchy
|
||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0069
|
||||||
|
ticket: pbs-lsp-find-references
|
||||||
|
title: PBS find-references is the physical inverse of definition
|
||||||
|
created: 2026-09-21
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, references]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS find-references is the physical inverse of definition
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS already had compiler-backed completion, hover, signature help, and go-to-definition (`LSN-0051`, `LSN-0068`). Users still could not ask where a resolved symbol is used. Text search confuses overloads, shadowing, members, comments, and coincidental names. Rename (`AGD-0046`) and hierarchy (`AGD-0056`) need an honest usage list before they exist.
|
||||||
|
|
||||||
|
The risk was inventing a `SymbolId` / `RefIndex`, waiting for snapshot cache (`AGD-0051`), or listing uses of stdlib APIs whose declarations are still virtual paths.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS Find References is the LSP projection of **physical usage sites** of the **same identity definition already returns**.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0053` (AGD-0043 Q1–Q6 = A):
|
||||||
|
|
||||||
|
1. Resolve the cursor through the definition path (locals, parameters, members, imports/supplementals, current-module top-level). Identity is that physical declaration-location set. Do not text-search. Do not add `SymbolId` or a persistent `RefIndex`.
|
||||||
|
2. A site is a usage when its definition locations intersect the cursor identity. Overloads follow that intersection.
|
||||||
|
3. If definition at the same offset is empty, references is empty.
|
||||||
|
4. Walk regular `fileTable` files from the current `analyze()` surface. Do not scan `/virtual/stdlib` or other non-regular handles.
|
||||||
|
5. Keep the capability on the existing aggregated `FrontendLanguageService`. Reuse `FrontendDefinitionLocation`. Map PBS spans in `prometeu-frontend-pbs`. Common LSP must not import `p.studio.compiler.pbs.*`. No References SPI.
|
||||||
|
6. Honor LSP `includeDeclaration` in the server: union usage sites with definition locations when the host asks and the declaration is a regular file. No read/write classification.
|
||||||
|
7. Advertise `referencesProvider`. Partial coverage is valid. Analysis stays request-local. This discussion does not build rename, hierarchy, workspace symbols, virtual documents, or snapshot cache.
|
||||||
|
|
||||||
|
Spec 23 §8.3 now also states: a references location must identify a compiler-known physical source file; empty definition implies empty references; `includeDeclaration` must not invent a virtual location.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS editorial | `PbsEditorialSupportService.references` walks `IDENTIFIER` tokens and keeps sites whose `definition` locations intersect the cursor identity (`FileId` + start + end). |
|
||||||
|
| Generic contract | `FrontendLanguageService.references` defaults to `List.of()`. `FrontendEditorialContext.projectSurface` carries the PBS semantic read surface so the walk can see `astByFile`. |
|
||||||
|
| PBS mapping | `PBSFrontendLanguageService` requires a non-empty physical definition set, skips non-regular files, and maps surviving spans through the same `Files.isRegularFile` helper as definition. |
|
||||||
|
| LSP | `referencesProvider`, `textDocument/references`. The bridge applies `includeDeclaration` by unioning `references` with `definition`. Compile-only frontends stay empty. |
|
||||||
|
| VS Code | Unchanged thin client. |
|
||||||
|
|
||||||
|
Stdlib and SDK modules remain virtual (`/virtual/stdlib/...`). Shift+F12 on `Gfx.clear` is empty, matching F12. Hover is unchanged.
|
||||||
|
|
||||||
|
Local binding names are not usage sites: definition at `let total` is empty because the name is not yet in scope. The use `return total` matches. `includeDeclaration` adds the declaration span from definition, not a second name search.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Same-file function uses, including the declaring identifier (top-level names resolve to themselves):
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
|
||||||
|
fn frame() -> void {
|
||||||
|
helper();
|
||||||
|
helper();
|
||||||
|
// helper // not a reference
|
||||||
|
let text = "helper"; // not a reference
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Imported project (or otherwise physical) symbols collect uses in the importing file. Identity is the foreign declaration span.
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Log as Logger } from @sdk:log;
|
||||||
|
Logger.info("a");
|
||||||
|
Logger.info("b");
|
||||||
|
```
|
||||||
|
|
||||||
|
If `@sdk:log` is only a virtual handle, definition is empty, so references is empty.
|
||||||
|
|
||||||
|
Builtins stay hover-only:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
let n: int = 1; // hover works; references is empty
|
||||||
|
```
|
||||||
|
|
||||||
|
`includeDeclaration=true` adds the canonical declaration location on top of identifier usage sites. `false` returns usages only.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not implement find-references as workspace text search in `lsp-v1` or in the VS Code extension. It will lie about overloads, members, and imports, then poison rename.
|
||||||
|
|
||||||
|
Do not add a `SymbolId` index “for rename later”. Definition already gave the key: physical declaration locations. Rename can consume this list once it has its own decision.
|
||||||
|
|
||||||
|
Do not wait for snapshot cache. The LSP already reanalyzes on each editorial request. Snapshots (`AGD-0051`) can make the walk cheaper without changing the contract.
|
||||||
|
|
||||||
|
Do not treat empty stdlib references as a missing feature. Virtual paths are not regular files. Empty is the honest result until those sources live on disk.
|
||||||
|
|
||||||
|
Do not expect `let total` to appear as a usage of `total`. Inverse-of-definition only keeps identifier sites that themselves resolve. The declaration span arrives through `includeDeclaration`.
|
||||||
|
|
||||||
|
Do not put `includeDeclaration` into PBS types. It is a host flag applied in the LSP bridge.
|
||||||
|
|
||||||
|
Do not scan `/virtual/stdlib` to “find more uses”. That reopens virtual documents.
|
||||||
|
|
||||||
|
Do not split a References SPI “for future languages”. PBS is a real consumer of `FrontendLanguageService` (`LSN-0067`).
|
||||||
|
|
||||||
|
Do not treat this lesson as closing rename, snapshots, workspace symbols, document links, or hierarchy.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0043` (Q1–Q6 = A)
|
||||||
|
- Decision: `DEC-0053`
|
||||||
|
- Plan: `PLN-0132`
|
||||||
|
- Spec 23 §8.3 — optional navigation; physical-file-or-empty; empty definition implies empty references
|
||||||
|
- `LSN-0068` — definition identity this feature inverts
|
||||||
|
- `LSN-0051` — wave 1 deferred navigation
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for LSP
|
||||||
|
- `LSN-0047` — protocol stays in `lsp-v1`; compiler owns semantics
|
||||||
|
- `LSN-0067` — no SPI without a real in-repo consumer
|
||||||
|
- Still open: `AGD-0046` rename, `AGD-0045` workspace symbols, `AGD-0051` snapshots, `AGD-0055` document links, `AGD-0056` hierarchy
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0070
|
||||||
|
ticket: pbs-lsp-document-symbols-outline
|
||||||
|
title: PBS outline is an AST-backed document-symbol tree
|
||||||
|
created: 2026-09-21
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, outline, document-symbols]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS outline is an AST-backed document-symbol tree
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS already had compiler-backed completion, hover, signature help, go-to-definition (`LSN-0068`), and find-references (`LSN-0069`). VS Code Outline stayed empty. Long `.pbs` files had to be scanned by hand.
|
||||||
|
|
||||||
|
The risk was building outline from semantic success (so the tree vanishes while typing), flattening to `SymbolInformation`, inventing a Document Symbol SPI, or stuffing workspace search and folding into the same payload.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS Document Symbols is the LSP projection of the **named declaration tree of the open `.pbs` file**, with the **recovered AST as backbone**.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0054` (AGD-0044 Q1 A, Q2 AST tree, Q3 A, Q4 A, Q5 A, Q6 `.pbs`-only, Q7 existing kinds):
|
||||||
|
|
||||||
|
1. Presence, hierarchy, and ranges come from the document AST. Kind and `detail` may use cheap semantic enrichment. Semantics must not drop a named declaration still in the syntax tree, and must not require full analysis.
|
||||||
|
2. Named `TopDecl` plus syntactic members:
|
||||||
|
- `fn` → Function, no children;
|
||||||
|
- `declare struct` → Struct, children: fields, `ctor`s, methods;
|
||||||
|
- `declare service` → Service, children: methods;
|
||||||
|
- `declare contract` → Contract, children: signatures as methods;
|
||||||
|
- `declare host` → Host, children: signatures;
|
||||||
|
- `declare builtin type` → Builtin type, children: projection fields and signatures;
|
||||||
|
- `declare enum` → Enum, children: cases;
|
||||||
|
- `declare error` → Error, children: labels;
|
||||||
|
- `declare callback` → Callback, no children;
|
||||||
|
- `declare global` / `const` → Global / Const, no children;
|
||||||
|
- `implements Contract for Owner` → top-level Contract named `contractName`, `detail` = owner name, children: methods.
|
||||||
|
Locals, parameters, `this`, imports, and comments stay out. Private fields stay in. Overloads stay siblings. Host and builtin type appear only if the open file declares them.
|
||||||
|
3. Recovered AST is enough. Unnamed `InvalidDecl` is omitted. Named decls survive later semantic errors. No `PbsAst.File` → empty list. Do not invent nodes from text or token pairs.
|
||||||
|
4. Keep the capability on aggregated `FrontendLanguageService.documentSymbols` (default empty) plus a hierarchical DTO (`name`, `kind`, optional `detail`, range offsets, selection offsets, `children`). No file path on the DTO. PBS builds the tree in `prometeu-frontend-pbs`. Common LSP must not import `p.studio.compiler.pbs.*`. No Document Symbol SPI.
|
||||||
|
5. Advertise `documentSymbolProvider`. Payload is hierarchical `DocumentSymbol`, not flat `SymbolInformation`. `range` is the declaration span. `selectionRange` is the name span only if the AST already has one; this wave reuses the declaration span. Do not scan tokens for identifier spans. VS Code stays a thin client.
|
||||||
|
6. First wave is the current `.pbs` only. Out: imported supplementals, `mod.barrel`, locals, parameters, imports, comments, virtual documents, workspace symbols, folding, rename, snapshot cache. Server order is AST declaration order, not alphabetical.
|
||||||
|
7. Reuse `FrontendSymbolKind` / `PbsEditorialSymbolKind`. LSP projects to the closest host `SymbolKind`. Name is the identifier. `detail` may carry the AST signature (`(a: int) -> int`). Attributes such as `[Init]` do not enter the name.
|
||||||
|
|
||||||
|
Outline does not jump to another file. The physical-file destination policy of definition/references is not the outline policy.
|
||||||
|
|
||||||
|
Spec 23 §8.3 now also states: document symbols are the named declaration tree of the requested document; recovered syntax is enough; a missing syntax tree is empty; this is not a workspace index, folding ranges, or a foreign-file navigation list.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS editorial | `PbsAstDocumentSymbols` walks `PbsAst.File.topDecls` in source order. `PbsEditorialSupportService.documentSymbols` delegates to that walk. |
|
||||||
|
| Generic contract | `FrontendLanguageService.documentSymbols` defaults to `List.of()`. `FrontendDocumentSymbol` is hierarchical and pathless. |
|
||||||
|
| PBS mapping | `PBSFrontendLanguageService` requires `editorialContext.syntaxTree()` to be `PbsAst.File`. Barrels and unknown trees stay empty. Kinds map with `valueOf(kind.name())`. |
|
||||||
|
| LSP | `documentSymbolProvider`, `textDocument/documentSymbol`, hierarchical `DocumentSymbol`. Nested enum/error children project to `EnumMember`. Compile-only frontends stay empty. |
|
||||||
|
| VS Code | Unchanged thin client. |
|
||||||
|
|
||||||
|
`mod.barrel` is assembled as `BarrelFile`, not `PbsAst.File`, so `astByFile` has no barrel outline. Empty is the honest first-wave result.
|
||||||
|
|
||||||
|
Error case labels have no per-label span in the AST. Children reuse the parent `ErrorDecl` span rather than scanning tokens.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Outline of a file is the declarations in that file, not imports or locals:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Log } from @sdk:log;
|
||||||
|
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
|
||||||
|
fn frame() -> void {
|
||||||
|
let local = 1;
|
||||||
|
helper(local);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Outline: `helper`, `frame`. Not `Log`, not `local`.
|
||||||
|
|
||||||
|
Struct members and overloads as siblings:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
declare struct Vec(x: int) {
|
||||||
|
ctor make(x: int) { return; }
|
||||||
|
fn blend(dx: int, dy: int) -> int { return dx; }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
fn helper(value: int) -> int { return value; }
|
||||||
|
```
|
||||||
|
|
||||||
|
Outline: `Vec` (`x`, `make`, `blend`), then two `helper` siblings. Private field `x` is present. `detail` on `blend` is `(dx: int, dy: int) -> int`.
|
||||||
|
|
||||||
|
Recovered parse keeps the named decl:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
declare ;
|
||||||
|
fn ok() -> int { return 1; }
|
||||||
|
```
|
||||||
|
|
||||||
|
Outline: `ok`. The unnamed `InvalidDecl` is omitted.
|
||||||
|
|
||||||
|
`[Init] fn init()` still names the symbol `init`.
|
||||||
|
|
||||||
|
`implements TickLike for Point` is a top-level node named `TickLike` with detail `Point`.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not wait for semantic analysis to succeed before showing outline. The tree must survive broken intermediate edits.
|
||||||
|
|
||||||
|
Do not omit private fields because they are not in `mod.barrel`. Outline is for the author of this file.
|
||||||
|
|
||||||
|
Do not collapse overloads. AST identity forbids merging declaration sets.
|
||||||
|
|
||||||
|
Do not walk `File.imports` or supplemental imported `TopDecl`s. Those symbols are not declared in this document.
|
||||||
|
|
||||||
|
Do not implement outline for `mod.barrel` in this contract. Barrel AST is a different root. Empty is correct until a later decision.
|
||||||
|
|
||||||
|
Do not scan tokens to invent a tighter `selectionRange`. This wave uses the declaration span.
|
||||||
|
|
||||||
|
Do not put a file path on `FrontendDocumentSymbol`. The host already has the document URI. Outline is not go-to-definition.
|
||||||
|
|
||||||
|
Do not reuse the physical-file jump rule of `LSN-0068` as an outline destination policy. Clicking outline stays inside the buffer.
|
||||||
|
|
||||||
|
Do not overload document symbols with folding or scope guides (`LSN-0034`, `AGD-0053`).
|
||||||
|
|
||||||
|
Do not split a Document Symbol SPI “for future languages”. PBS is a real consumer of `FrontendLanguageService` (`LSN-0067`).
|
||||||
|
|
||||||
|
Do not treat this lesson as closing workspace symbols, folding, rename, document links, or hierarchy.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0044` (Q1 A, Q2 AST tree, Q3 A, Q4 A, Q5 A, Q6 `.pbs`-only, Q7 existing kinds)
|
||||||
|
- Decision: `DEC-0054`
|
||||||
|
- Plan: `PLN-0133`
|
||||||
|
- Spec 23 §8.3 — optional document symbols; recovered AST tree of the requested document
|
||||||
|
- `LSN-0068` — definition is a jump; outline is not
|
||||||
|
- `LSN-0069` — references invert definition identity
|
||||||
|
- `LSN-0034` — do not overload document symbols with structural anchors
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for LSP
|
||||||
|
- `LSN-0047` — protocol stays in `lsp-v1`; compiler owns semantics
|
||||||
|
- `LSN-0067` — no SPI without a real in-repo consumer
|
||||||
|
- Still open: `AGD-0045` workspace symbols, `AGD-0046` rename, `AGD-0051` snapshots, `AGD-0053` folding, `AGD-0055` document links, `AGD-0056` hierarchy
|
||||||
+149
@@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0071
|
||||||
|
ticket: pbs-lsp-workspace-symbols
|
||||||
|
title: PBS workspace symbols are a physical named-declaration search
|
||||||
|
created: 2026-09-21
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, workspace-symbols]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS workspace symbols are a physical named-declaration search
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS already had compiler-backed completion, hover, signature help, go-to-definition (`LSN-0068`), find-references (`LSN-0069`), and an AST-backed outline of the open `.pbs` file (`LSN-0070`). VS Code workspace search (`Ctrl+T` / `workspace/symbol`) stayed empty.
|
||||||
|
|
||||||
|
The risk was treating workspace symbols as a second outline, inventing a `SymbolId` index, waiting for snapshot cache (`AGD-0051`), or returning stdlib/SDK hits whose declarations are still virtual paths (`/virtual/stdlib`). Workspace symbols is a jump. Outline is not.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS Workspace Symbols is the LSP projection of a **flat named-declaration search** over **regular filesystem files** of the current analysis, flattening the **same outline set** and using the **same physical-file destination policy** as definition.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0055` (AGD-0045 Q1 A, Q2 A, Q3 A, Q4 A, Q5 A, Q6 first-wave exclusions):
|
||||||
|
|
||||||
|
1. Emit only declarations whose `fileTable` handle is a regular filesystem file. Virtual stdlib/SDK, including `/virtual/stdlib`, is omitted. Do not invent virtual documents, `untitled:` buffers, or synthetic URIs.
|
||||||
|
2. `workspace/symbol` does not require an open text document. The server obtains the project analysis surface (`astByFile` / `projectSurface`) from `analyze()`. Missing surface → empty list.
|
||||||
|
3. The set is the flatten, file by file, of the named-declaration tree locked by outline (`LSN-0070`):
|
||||||
|
- `fn` → Function;
|
||||||
|
- `declare struct` → Struct plus fields, `ctor`s, methods;
|
||||||
|
- `declare service` → Service plus methods;
|
||||||
|
- `declare contract` → Contract plus signatures;
|
||||||
|
- `declare host` → Host plus signatures;
|
||||||
|
- `declare builtin type` → Builtin type plus projection fields and signatures;
|
||||||
|
- `declare enum` → Enum plus cases;
|
||||||
|
- `declare error` → Error plus labels;
|
||||||
|
- `declare callback` → Callback;
|
||||||
|
- `declare global` / `const` → Global / Const;
|
||||||
|
- `implements Contract for Owner` → `contractName`, kind CONTRACT, `detail` = owner, plus methods.
|
||||||
|
Locals, parameters, `this`, imports, and comments stay out. Private fields stay in. Overloads stay sibling hits. Unnamed `InvalidDecl` is omitted. Named decls survive later semantic errors.
|
||||||
|
4. First wave is `.pbs` whose recovered root is `PbsAst.File`. `mod.barrel` (`BarrelFile`) stays empty. Presence, name, kind, `detail`, and spans come from recovered AST. Do not invent nodes from text search.
|
||||||
|
5. Query is a case-insensitive substring of `name` only. Blank query returns the full first-wave corpus. Do not match `detail`, path, `containerName`, or qualified `Vec.blend`. No fuzzy ranking, no `top N`. After the filter, order is stable by name, then path, then start offset.
|
||||||
|
6. `containerName` is the parent name for members and empty for top-level declarations. `detail` may repeat the outline AST signature. Attributes such as `[Init]` do not enter the name.
|
||||||
|
7. Keep the capability on aggregated `FrontendLanguageService`. Add `workspaceSymbols` (default empty) plus a flat DTO with `name`, `kind`, optional `detail`, `containerName`, absolute path, and offsets. Do not reuse pathless `FrontendDocumentSymbol`. PBS flattens in `prometeu-frontend-pbs`. Common LSP must not import `p.studio.compiler.pbs.*`. No Workspace Symbol SPI, `SymbolId`, `RefIndex`, or snapshot cache.
|
||||||
|
8. Advertise `workspaceSymbolProvider` when the frontend exposes a language service. Payload is flat `SymbolInformation`. Do not emit hierarchical `DocumentSymbol` on this request. Compile-only frontends stay empty. VS Code stays a thin client.
|
||||||
|
|
||||||
|
Spec 23 §8.3 now also states: workspace symbols are a flat search of named declarations in compiler-known physical source files of the current analysis; recovered syntax is enough; a missing analysis surface is empty; the request must not require an open document; a declaration without a physical file is omitted; this is not outline, folding, a persistent index, or navigation to virtual locations.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS editorial | `PbsAstWorkspaceSymbols` flattens `PbsAstDocumentSymbols` and filters by name. `PbsEditorialSupportService.workspaceSymbols(ast, query)` delegates to that flatten. |
|
||||||
|
| Generic contract | `FrontendWorkspaceRequest` (`projectRoot`, `query`). `FrontendWorkspaceSymbol` carries path. `FrontendLanguageService.workspaceSymbols` defaults to `List.of()`. `prepareEditorialContext(FrontendPhaseContext)` defaults to empty so a workspace request can obtain project surface without a `FileId`. |
|
||||||
|
| PBS mapping | Project-level `prepareEditorialContext` attaches `fileTable` + `astByFile`. Regular `PbsAst.File` entries are flattened; non-regular handles are skipped. Results sort by name, path, offset. |
|
||||||
|
| LSP | `workspaceSymbolProvider`, `workspace/symbol` on `PrometeuWorkspaceService` (no document URI). `CompilerLanguageServiceBridge` analyzes the project with an empty overlay map. Mapper emits flat `SymbolInformation`. Nested enum/error hits with a container project to `EnumMember`. Compile-only frontends stay empty. |
|
||||||
|
| VS Code | Unchanged thin client. |
|
||||||
|
|
||||||
|
`workspace/symbol` in this wave reads the project on disk. Unsaved editor overlays are not shared into the search. Empty is honest until a later overlay/snapshot decision.
|
||||||
|
|
||||||
|
`mod.barrel` is still `BarrelFile`, not `PbsAst.File`. Empty barrel hits are the honest first-wave result.
|
||||||
|
|
||||||
|
Error case labels still have no per-label span. Flattened children reuse the parent `ErrorDecl` span, same as outline.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Workspace search of a project file is the flatten of that file's outline, not imports or locals:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Log } from @sdk:log;
|
||||||
|
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
|
||||||
|
fn frame() -> void {
|
||||||
|
let local = 1;
|
||||||
|
helper(local);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Query `frame` → `frame`. Query `helper` → `helper`. Query empty → `helper`, `frame` (plus other physical decls), sorted. Not `Log`, not `local`.
|
||||||
|
|
||||||
|
Members keep a container; overloads stay siblings:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
declare struct Vec(x: int) {
|
||||||
|
ctor make(x: int) { return; }
|
||||||
|
fn blend(dx: int, dy: int) -> int { return dx; }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn helper() -> int { return 42; }
|
||||||
|
fn helper(value: int) -> int { return value; }
|
||||||
|
```
|
||||||
|
|
||||||
|
Query `blend` → method `blend` with `containerName` `Vec`. Query `helper` → two hits. Query `Vec.blend` → empty (this wave matches `name` only).
|
||||||
|
|
||||||
|
Stdlib remains hover-only while the handle is virtual:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Gfx } from @sdk:gfx;
|
||||||
|
Gfx.clear(0);
|
||||||
|
```
|
||||||
|
|
||||||
|
Query `Gfx` is empty. F12 on `Gfx.clear` is already empty (`LSN-0068`). Workspace search does not reopen that jump.
|
||||||
|
|
||||||
|
Recovered parse keeps the named decl:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
declare ;
|
||||||
|
fn ok() -> int { return 1; }
|
||||||
|
```
|
||||||
|
|
||||||
|
Query empty → `ok`. The unnamed `InvalidDecl` is omitted.
|
||||||
|
|
||||||
|
`[Init] fn init()` still names the symbol `init`.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not implement workspace symbols as workspace text search in `lsp-v1` or in the VS Code extension. It will lie about overloads, members, and imports.
|
||||||
|
|
||||||
|
Do not reuse `FrontendDocumentSymbol`. Outline is pathless because the host already has the document URI. Workspace symbols is a jump and must carry a path.
|
||||||
|
|
||||||
|
Do not require an open editor buffer to answer `workspace/symbol`. Analyze the project and walk `astByFile`.
|
||||||
|
|
||||||
|
Do not include `/virtual/stdlib` so Ctrl+T on `Gfx` “does something”. Empty is the honest result until those sources are regular files.
|
||||||
|
|
||||||
|
Do not wait for snapshot cache. References already walks the current analysis request-locally. Snapshots (`AGD-0051`) can make the walk cheaper without changing this contract.
|
||||||
|
|
||||||
|
Do not add a `SymbolId` index “for rename later”. Outline already named the declarations; definition already named the destination.
|
||||||
|
|
||||||
|
Do not match `containerName`, path, or `Vec.blend` in this wave. The query is a substring of `name`.
|
||||||
|
|
||||||
|
Do not emit hierarchical `DocumentSymbol` on `workspace/symbol`. That payload is outline.
|
||||||
|
|
||||||
|
Do not treat unsaved overlay absence as a missing feature of this contract. First-wave analysis is the project on disk.
|
||||||
|
|
||||||
|
Do not split a Workspace Symbol SPI “for future languages”. PBS is a real consumer of `FrontendLanguageService` (`LSN-0067`).
|
||||||
|
|
||||||
|
Do not treat this lesson as closing rename, snapshots, folding, document links, or hierarchy.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0045` (Q1 A, Q2 A, Q3 A, Q4 A, Q5 A, Q6 first-wave exclusions)
|
||||||
|
- Decision: `DEC-0055`
|
||||||
|
- Plan: `PLN-0134`
|
||||||
|
- Spec 23 §8.3 — optional workspace symbols; physical-file-or-omit; no open document required
|
||||||
|
- `LSN-0070` — outline set this feature flattens
|
||||||
|
- `LSN-0068` — physical-file destination this feature reuses
|
||||||
|
- `LSN-0069` — project `astByFile` walk already exists for references
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for LSP
|
||||||
|
- `LSN-0047` — protocol stays in `lsp-v1`; compiler owns semantics
|
||||||
|
- `LSN-0067` — no SPI without a real in-repo consumer
|
||||||
|
- Still open: `AGD-0046` rename, `AGD-0051` snapshots, `AGD-0053` folding, `AGD-0055` document links, `AGD-0056` hierarchy
|
||||||
+128
@@ -0,0 +1,128 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0072
|
||||||
|
ticket: pbs-lsp-rename-symbol
|
||||||
|
title: PBS rename is a validated physical workspace edit
|
||||||
|
created: 2026-09-22
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, rename]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS rename is a validated physical workspace edit
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS already had compiler-backed completion, hover, signature help, go-to-definition (`LSN-0068`), find-references (`LSN-0069`), outline (`LSN-0070`), and workspace symbols (`LSN-0071`). Users still could not rename a symbol through the editor. Manual text edits miss uses or rewrite unrelated overloads, comments, strings, and same-name declarations.
|
||||||
|
|
||||||
|
The risk was a file-local rename, a lexeme replace, a new `SymbolId` / `RefIndex`, snapshot cache (`AGD-0051`) as a prerequisite, virtual stdlib documents, or a successful empty `WorkspaceEdit` that pretends the symbol changed.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS Rename Symbol is the LSP projection of a **validated `WorkspaceEdit`** over **physical identifier spans** of the **same identity definition already returns**.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0056` (AGD-0046 Q1–Q6 = A):
|
||||||
|
|
||||||
|
1. Identity is the physical declaration-location set from definition. Do not text-search. Do not add `SymbolId` or a persistent `RefIndex`.
|
||||||
|
2. Sites are identifier tokens whose definition intersects that identity, plus identifier-sized declaration name spans. Overloads of the same name in the same owner rewrite together. Members rewrite only that member. Comments, strings, and homonyms of another identity stay.
|
||||||
|
3. Walk regular `fileTable` files of the current `analyze()` surface. Omit `/virtual/stdlib` and other non-regular handles. Every edit location must be a compiler-known physical source file.
|
||||||
|
4. Refuse when physical identity is empty: builtins, virtual stdlib/SDK, unresolved names, keywords, comments, strings, `this`, `Self`. Refuse `mod.barrel`. Refuse `declare error` case labels that have no per-label span.
|
||||||
|
5. Exception: a local or parameter name span is renameable even when definition at that offset is empty. Identity becomes that name span; uses are identifiers whose definition intersects it.
|
||||||
|
6. Refuse when the cursor lexeme is an import alias (`item.alias()` distinct from `item.name()`), including uses of that alias. Do not follow alias definition and rewrite the export. Export rename happens only when the cursor writes the original name. Export rewrite must not change `as Alias` tokens or uses that spell a differing alias.
|
||||||
|
7. `prepareRename` validates the cursor and returns the identifier range, or null. `rename` also validates the new name: PBS identifier, not a keyword, no collision in the same binding space (top-level `fn`/`service`/`global`/`const`, local/param in the same scope, field in the same struct, method in the same owner, case in the same enum), ignoring rewritten sites and the overload set. Failure is an LSP error. Never return a successful empty `WorkspaceEdit`. The server does not write files and does not rename paths.
|
||||||
|
8. Keep the capability on aggregated `FrontendLanguageService`. `prepareRename` defaults empty; `rename` defaults unsupported. PBS maps in `prometeu-frontend-pbs`. Common LSP must not import `p.studio.compiler.pbs.*`. No Rename SPI. Advertise `renameProvider` with `prepareProvider`. Compile-only stays unsupported. VS Code stays a thin client.
|
||||||
|
|
||||||
|
Spec 23 §8.3 now also states: rename is a validated workspace edit of identifier spans in compiler-known physical source files; identity is definition; local/param name spans remain renameable; alias, virtual, and error-label cursors refuse; invalid names and collisions are protocol errors, not empty success; the server does not write files; `prepareProvider` is advertised when rename is exposed.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS editorial | `PbsEditorialSupportService.planRename` builds identity from definition or local/param name span, refuses aliases and error labels, walks `IDENTIFIER` tokens whose definition intersects identity and whose lexeme is the original name, then validates identifier/keyword/collision. |
|
||||||
|
| Generic contract | `FrontendLanguageService.prepareRename` defaults empty. `rename` defaults `FrontendRenameResult.unsupported()`. `FrontendRenameEdit` is path + offsets + `newText`. Applied results reject an empty edit list. |
|
||||||
|
| PBS mapping | `PBSFrontendLanguageService` reuses `projectDocuments` and `toFrontendLocation`. Empty physical identity is refuse, even if editorial sites exist on virtual handles. |
|
||||||
|
| LSP | `renameSupported`, `prepareRename`, `rename`. Mapper advertises `RenameOptions.prepareProvider`. Refused rename is `ResponseErrorException`, not an empty `WorkspaceEdit`. Compile-only does not advertise. |
|
||||||
|
| VS Code | Unchanged thin client. |
|
||||||
|
|
||||||
|
Stdlib and SDK modules remain virtual (`/virtual/stdlib/...`). F2 on `Gfx.clear` is refused, matching empty F12 / Shift+F12. Hover is unchanged.
|
||||||
|
|
||||||
|
`let total` at the binding itself still has empty definition. Rename uses the name span as identity so F2 on the binding works.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Same-file function, including overloads and the declaring identifier. Comment and string stay:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn helper() -> int { return 1; }
|
||||||
|
fn helper(value: int) -> int { return value; }
|
||||||
|
|
||||||
|
fn frame() -> void {
|
||||||
|
helper();
|
||||||
|
helper(2);
|
||||||
|
// helper
|
||||||
|
let text = "helper";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
F2 on `helper` → `aid` rewrites both declarations and both calls.
|
||||||
|
|
||||||
|
Local name span:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn frame() -> void {
|
||||||
|
let total = 1;
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
F2 on `let total` or on the use rewrites both identifier sites.
|
||||||
|
|
||||||
|
Alias is refused. Export rename keeps the local alias:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
import { Log as Logger } from @sdk:log;
|
||||||
|
Logger.info("a");
|
||||||
|
```
|
||||||
|
|
||||||
|
F2 on `Logger` or `Logger.info` is refused. F2 on a physical `Log` declaration rewrites the original name and `import { Log as Logger }`, and leaves `Logger` / `Logger.info`.
|
||||||
|
|
||||||
|
Builtins and virtual stdlib stay hover-only:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
let n: int = 1;
|
||||||
|
Gfx.clear(5);
|
||||||
|
```
|
||||||
|
|
||||||
|
Invalid new names (`fn`, `1ab`) and collisions (`helper` → existing `frame`) fail with an LSP error.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not implement rename as workspace text search in `lsp-v1` or in the VS Code extension. It will rewrite comments, strings, overloads of another identity, and import aliases.
|
||||||
|
|
||||||
|
Do not follow definition through an import alias. `Logger` currently resolves to `Log`'s span; a blind inverse-of-definition rename would rewrite the export.
|
||||||
|
|
||||||
|
Do not return a successful empty `WorkspaceEdit` for a refused cursor. The editor will treat that as “renamed”.
|
||||||
|
|
||||||
|
Do not skip the local/param name-span exception. F2 on `let total` is the common case, and definition there is empty.
|
||||||
|
|
||||||
|
Do not rewrite `declare error` case labels by using the parent `ErrorDecl` span. Those labels have no per-label span.
|
||||||
|
|
||||||
|
Do not wait for snapshot cache. Rename reuses the request-local walk already used by references.
|
||||||
|
|
||||||
|
Do not treat empty/refused stdlib rename as a missing feature. Virtual paths are not regular files.
|
||||||
|
|
||||||
|
Do not split a Rename SPI “for future languages”. PBS is a real consumer of `FrontendLanguageService` (`LSN-0067`).
|
||||||
|
|
||||||
|
Do not treat this lesson as closing snapshots, folding, document links, hierarchy, code actions, formatting, file rename, or local-alias rename.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0046` (Q1–Q6 = A)
|
||||||
|
- Decision: `DEC-0056`
|
||||||
|
- Plan: `PLN-0135`
|
||||||
|
- Spec 23 §8.3 — optional rename; physical-file-or-empty; alias refuse; error instead of empty success; `prepareProvider`
|
||||||
|
- Spec: `docs/specs/compiler-languages/pbs/3. Core Syntax Specification.md` §4.3–4.4
|
||||||
|
- `LSN-0068` — definition identity this feature writes
|
||||||
|
- `LSN-0069` — physical inverse that supplies usage sites
|
||||||
|
- `LSN-0051` — wave 1 deferred rename
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for LSP
|
||||||
|
- `LSN-0047` — protocol stays in `lsp-v1`; compiler owns semantics
|
||||||
|
- `LSN-0067` — no SPI without a real in-repo consumer
|
||||||
|
- Still open: `AGD-0051` snapshots, `AGD-0053` folding, `AGD-0055` document links, `AGD-0056` hierarchy
|
||||||
+130
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0073
|
||||||
|
ticket: pbs-lsp-code-actions
|
||||||
|
title: PBS quick fixes are frontend repairs transported by the LSP
|
||||||
|
created: 2026-09-22
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor, code-actions, quick-fix]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS quick fixes are frontend repairs transported by the LSP
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
PBS diagnostics already reach the editor, but the server did not advertise `codeActionProvider`. A user could see a duplicate attribute or a bad `InitAllowed` and still had to repair it by hand.
|
||||||
|
|
||||||
|
The tempting shortcut was a code-to-edit table in the LSP. That shortcut does not work. Compiler `Diagnostic` values carry a stable code, phase, template, placeholders, span, and related locations, but the reserved-attribute reports use the short constructor: empty placeholders, and the English sentence is the only fine discriminator. `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` covers Doc without `markdown`, a wrong payload, empty markdown, an unknown argument, `InitAllowed` with arguments, an out-of-range `AssetLowering`, and a bad `Host` shape. A switch on the code cannot pick a safe edit without reading the message. Diagnostic wording is rendering, not identity. Code actions are an optional editorial capability: the frontend owns the meaning, and the LSP transports it.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
PBS quick fix is one `WorkspaceEdit` tied to one diagnostic of the requested physical document. The frontend produces the repair from the syntax tree. The LSP does not invent it.
|
||||||
|
|
||||||
|
Durable locks from `DEC-0057` (AGD-0047: scope A, producer B, residence B, first wave C):
|
||||||
|
|
||||||
|
1. This wave is quick fix only. No organize-imports, source action, refactor, function or struct stub, code lens, or server command.
|
||||||
|
2. The server does not write files. The client applies the edit.
|
||||||
|
3. Each repair names the stable diagnostic code, the primary span of that diagnostic, and exactly one local text edit. The LSP must not keep a code-to-edit table and must not read the diagnostic message to build the edit.
|
||||||
|
4. The repair is computed on `textDocument/codeAction` from the current document analysis. It is not a required field of compiler `Diagnostic`, and it is not published inside `publishDiagnostics`, including `data`.
|
||||||
|
5. `publishDiagnostics` carries the stable compiler code on `Diagnostic.code` so the client can echo it. Source, severity, message, and related information stay as they were. Those presentation questions remain with `AGD-0054`.
|
||||||
|
6. A repair is returned only when the request context contains a diagnostic with the same code and the same primary range. An empty diagnostic list returns an empty action list. An `only` filter that does not include quick fix returns an empty action list.
|
||||||
|
7. Each item is a QuickFix `CodeAction`, not a `Command`. The edit touches one file, the requested physical document, and contains one `TextEdit`. There is no lazy resolve.
|
||||||
|
8. A path that is not a compiler-known regular file, including `/virtual/stdlib`, gets no edit.
|
||||||
|
9. If the frontend does not expose the capability, the server does not advertise `codeActionProvider`. A request that arrives anyway returns an empty list, not a protocol error. Absence of a fix is not a refused cursor.
|
||||||
|
10. PBS exposes the capability. Another frontend does not gain it merely by having a language service.
|
||||||
|
11. The first wave is two shapes, not three diagnostic codes.
|
||||||
|
- For every extra reserved attribute the declaration validator already reports as `E_SEM_DUPLICATE_RESERVED_ATTRIBUTE`, delete exactly that occurrence's span. Do not delete the first occurrence, the declaration, or neighboring whitespace.
|
||||||
|
- For an `InitAllowed` attribute with a non-empty argument list on a host signature, the shape the validator reports as `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` when the file is an interface module, replace that attribute span with `[InitAllowed]`. Do not emit that repair for any other attribute that shares the code. `[InitAllowed()]` is not diagnosed today and gets no repair.
|
||||||
|
12. Nothing else gets a quick fix in this wave. In particular: inserting `[Doc(markdown = """""")]` or any other Doc rewrite, inserting an empty or incomplete `[Host]` or `[BuiltinType]`, `W_SEM_IGNORED_VALUE`, unresolved imports, an invalid reserved-attribute target, parse errors, unresolved overloads, and method stubs.
|
||||||
|
|
||||||
|
`AGD-0048` still owns formatting. `AGD-0049` still owns import assistance and organize-imports. `AGD-0054` still owns range, related locations, and diagnostic presentation. The PBS diagnostics spec does not gain a mandatory remediation field.
|
||||||
|
|
||||||
|
Spec 23 §8.3 now states the shared contract: code actions are quick fixes only; the frontend produces each repair from the document syntax; tooling transports it and does not parse the message or switch on codes; the published diagnostic carries the stable code; a repair is returned only for a matching context diagnostic; the edit is one physical file; the server does not write files, return a command, or require resolve; a missing capability is an empty list, not an error; virtual documents get no edit.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
| Layer | What landed |
|
||||||
|
|---|---|
|
||||||
|
| PBS repairs | `PbsQuickFixCollector` walks the same attribute surfaces as `PbsDeclarationSemanticsValidator`, including the interface-module gate. Duplicate reserved attributes become an empty replacement of the extra span. The first `InitAllowed` with arguments on an interface host signature becomes `[InitAllowed]`. |
|
||||||
|
| Source kind | `PbsSemanticReadSurface.sourceKindByFile` records the kind used to parse each file. A missing kind means project rules, so a project `declare host` does not pretend the validator emitted the interface-only `InitAllowed` diagnostic. |
|
||||||
|
| Generic contract | `FrontendLanguageService.codeActionsSupported` defaults false. `codeActions` defaults empty. `FrontendCodeAction` is title, diagnostic code, path, offsets, and `newText`. Empty `newText` is a deletion and is allowed. |
|
||||||
|
| PBS mapping | `PBSFrontendLanguageService` exposes the capability and returns repairs only for the requested regular file. `/virtual/stdlib` fails `Files.isRegularFile` and produces nothing. |
|
||||||
|
| LSP | `BaselineDocumentIssue.code` is copied onto `Diagnostic.code`. `data` stays unset. The bridge drops repairs whose code and range do not match a context diagnostic. `PrometeuTextDocumentService.codeAction` honors the quick-fix `only` filter and never fails the request for “no fix”. |
|
||||||
|
| Protocol | `codeActionProvider` is `CodeActionOptions` with kind `quickfix` and `resolveProvider` false, and only when the frontend reports support. Mapped actions are `CodeAction` values with a `WorkspaceEdit`. They are not `Command`s. |
|
||||||
|
|
||||||
|
Titles are `Remove duplicate reserved attribute` and `Remove InitAllowed arguments`.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Duplicate `Doc` on a project file. The first copy stays. Each later copy is deleted at its own span:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
[Doc(markdown = """
|
||||||
|
First.
|
||||||
|
""")]
|
||||||
|
[Doc(markdown = """
|
||||||
|
Second.
|
||||||
|
""")]
|
||||||
|
fn duplicated() -> void { return; }
|
||||||
|
```
|
||||||
|
|
||||||
|
The quick fix removes the second attribute and leaves `First.`. A context diagnostic with the same range but code `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` produces no action. An empty diagnostic list produces no action.
|
||||||
|
|
||||||
|
Malformed or empty Doc is visible and not repairable here:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
[Doc(text = """
|
||||||
|
Wrong argument.
|
||||||
|
""")]
|
||||||
|
fn malformed() -> void { return; }
|
||||||
|
```
|
||||||
|
|
||||||
|
`InitAllowed` with arguments is repaired only on an interface-module host signature:
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
declare host Gfx {
|
||||||
|
[Host(module = "gfx2d", name = "clear", version = 1)]
|
||||||
|
[InitAllowed(flag = 1)]
|
||||||
|
fn clear() -> void;
|
||||||
|
|
||||||
|
[Host(module = "gfx2d", name = "fill", version = 1)]
|
||||||
|
[InitAllowed()]
|
||||||
|
fn fill() -> void;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`clear` becomes `[InitAllowed]`. `fill` is already valid to the validator, so `[InitAllowed()]` is left alone. The same `InitAllowed(flag = 1)` inside a project file does not get that repair, because the validator does not emit the malformed-attribute diagnostic there.
|
||||||
|
|
||||||
|
The same collector deletes the extra copy of `BuiltinType`, `IntrinsicCall`, `BuiltinConst`, `Host`, and `AssetLowering` when the validator reports `E_SEM_DUPLICATE_RESERVED_ATTRIBUTE` for that surface. A malformed `Host` that merely shares the malformed-attribute code gets no edit.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
Do not choose the edit in `prometeu-lsp` by switching on `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` or by parsing the English message. The code is too coarse, and the message is not the identity.
|
||||||
|
|
||||||
|
Do not store the repair on compiler `Diagnostic` or in `Diagnostic.data`. Compilation and quick fix stay different surfaces. The published code exists so the client can echo it back.
|
||||||
|
|
||||||
|
Do not match on `Diagnostic.source` as if it were the long-term identity field. Today the bridge still copies the code into `source` for the existing presentation. The code-action match uses `Diagnostic.code`. `AGD-0054` may change `source` later.
|
||||||
|
|
||||||
|
Do not delete the first duplicate, and do not trim the whitespace around the deleted span. That cleanup is formatting and belongs to `AGD-0048`.
|
||||||
|
|
||||||
|
Do not insert `[Doc(markdown = """""")]`, an empty `[Host]`, or an empty `[BuiltinType]`. Those edits trade one diagnostic for another, or invent a declaration.
|
||||||
|
|
||||||
|
Do not treat `W_SEM_IGNORED_VALUE` as a source edit. Discard exists in lowering, not as PBS syntax.
|
||||||
|
|
||||||
|
Do not offer the `InitAllowed` rewrite for `[InitAllowed()]` or for a project file. The validator does not diagnose those shapes as “arguments not allowed”, so there is no diagnostic to attach.
|
||||||
|
|
||||||
|
Do not return a protocol error when there is no fix. Rename refuses a bad cursor with an error. Quick fix answers “nothing to do” with an empty list.
|
||||||
|
|
||||||
|
Do not advertise `codeActionProvider` for every frontend that has a language service. The default capability is unsupported.
|
||||||
|
|
||||||
|
Do not treat this lesson as closing formatting, import assistance, diagnostic presentation, snapshots, folding, document links, or hierarchy.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Agenda: `AGD-0047` (scope A, producer B, residence B, first wave C)
|
||||||
|
- Decision: `DEC-0057`
|
||||||
|
- Plan: `PLN-0136`
|
||||||
|
- Spec 23 §8.3 — optional code actions; frontend-owned repair; match by code and range; empty list when unsupported
|
||||||
|
- Spec: `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md` — wording is not identity; remediation stays outside the v1 diagnostic minimum
|
||||||
|
- `LSN-0056` — code actions are an optional editorial capability
|
||||||
|
- `LSN-0058` — generic `FrontendLanguageService` for the LSP
|
||||||
|
- `LSN-0067` — no new editorial SPI without a real consumer; PBS implements the existing language service
|
||||||
|
- Still open: `AGD-0048` formatting, `AGD-0049` import assistance, `AGD-0054` diagnostics UX, `AGD-0051` snapshots, `AGD-0056` hierarchy
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,88 @@
|
|||||||
|
# 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
@@ -0,0 +1,92 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,98 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,143 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,129 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,121 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,136 @@
|
|||||||
|
---
|
||||||
|
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
@@ -0,0 +1,148 @@
|
|||||||
|
---
|
||||||
|
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`
|
||||||
+151
@@ -0,0 +1,151 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0066
|
||||||
|
ticket: multi-frontend-architectural-tests
|
||||||
|
title: ArchUnit guards Java multi-frontend boundaries
|
||||||
|
created: 2026-09-19
|
||||||
|
tags: [compiler, compiler-general, studio, frontend, architecture, tests, multi-frontend]
|
||||||
|
---
|
||||||
|
|
||||||
|
# ArchUnit guards Java multi-frontend boundaries
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
The multi-frontend boundaries already existed in specs and lessons: common
|
||||||
|
code selects a frontend by `languageId`, `IRBackend` is language-neutral,
|
||||||
|
lifecycle assembly is common, and PBS is one provider. The automated
|
||||||
|
protection did not match that model.
|
||||||
|
|
||||||
|
The old guards walked Java source and searched for substrings:
|
||||||
|
|
||||||
|
- `import p.studio.compiler.pbs`
|
||||||
|
- `new PBSFrontendPhaseService(`
|
||||||
|
- `new PbsEditorialSupportService(`
|
||||||
|
|
||||||
|
Those checks missed field, signature, and constructor coupling. They also
|
||||||
|
treated `p.studio.compiler.pbs` as the whole PBS surface. Facades such as
|
||||||
|
`PBSFrontendProvider`, `PBSDefinitions`, and `PBSFrontendPhaseService` live
|
||||||
|
in the PBS module but not in that package. `prometeu-app` and
|
||||||
|
`prometeu-lsp-v1` declared an `implementation` dependency on PBS without
|
||||||
|
importing any PBS type.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
Java multi-frontend boundaries are enforced by **ArchUnit + JUnit 5**, not by
|
||||||
|
source substring search, except for the `__pbs.` literal scan that bytecode
|
||||||
|
cannot see.
|
||||||
|
|
||||||
|
Durable locks from DEC-0050:
|
||||||
|
|
||||||
|
- ArchUnit is test-only, pinned in `gradle/libs.versions.toml`.
|
||||||
|
- Rules live in the test-only Gradle project `:prometeu-architecture-tests`.
|
||||||
|
That project has no production sources. It is not a plugin loader.
|
||||||
|
- A PBS type is a class whose bytecode originates from
|
||||||
|
`:prometeu-compiler:frontends:prometeu-frontend-pbs`. Package
|
||||||
|
`p.studio.compiler.pbs` is not the complete boundary. Name prefixes
|
||||||
|
`PBS*` / `Pbs*` are not the identity.
|
||||||
|
- Production may depend on PBS types only in:
|
||||||
|
- the PBS module itself;
|
||||||
|
- `prometeu-frontend-registry` / `FrontendRegistryService`, and only on
|
||||||
|
`PBSFrontendProvider` and `PBSDefinitions`.
|
||||||
|
- `AppContainer` is not a PBS composition root. It may call
|
||||||
|
`FrontendRegistryService.bootstrapDefaults()`. It must not instantiate PBS
|
||||||
|
types.
|
||||||
|
- `synth` is not in the production allowlist and must not be registered in
|
||||||
|
`bootstrapDefaults()`.
|
||||||
|
- Runtime, PVM, and the Rust repository stay out of this discussion
|
||||||
|
(LSN-0061).
|
||||||
|
- `IRBackendExecutableContractTest` remains the public-contract shape audit.
|
||||||
|
ArchUnit covers module-origin dependence.
|
||||||
|
|
||||||
|
Do not migrate PBS facades into another package just to make the test
|
||||||
|
easier. Do not ban the word `PBS` in docs, fixtures, or comments.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
`:prometeu-architecture-tests` imports production classes under `p.studio`
|
||||||
|
with `ImportOption.DoNotIncludeTests` and applies three ArchUnit rules:
|
||||||
|
|
||||||
|
1. classes outside the PBS module and the registry must not depend on
|
||||||
|
PBS-module types;
|
||||||
|
2. registry production may depend only on `PBSFrontendProvider` and
|
||||||
|
`PBSDefinitions` from that module;
|
||||||
|
3. frontend-api `p.studio.compiler.models` must not depend on PBS-module
|
||||||
|
types.
|
||||||
|
|
||||||
|
A separate JUnit test walks `build.gradle.kts` files and allows the PBS
|
||||||
|
project dependency only for:
|
||||||
|
|
||||||
|
- `:prometeu-compiler:prometeu-frontend-registry` as `implementation`/`api`;
|
||||||
|
- `:prometeu-architecture-tests` as `testImplementation` (needed to classify
|
||||||
|
class origin).
|
||||||
|
|
||||||
|
The `__pbs.` source scan moved to
|
||||||
|
`CommonBackendPbsPrefixScanTest` and still covers `backend/`, `lifecycle/`,
|
||||||
|
and `workspaces/stages/`.
|
||||||
|
|
||||||
|
Gradle graph cleanup:
|
||||||
|
|
||||||
|
- `prometeu-app` and `prometeu-lsp-v1` no longer `implementation` PBS.
|
||||||
|
Runtime classloading of `PBSFrontendProvider` still comes through the
|
||||||
|
registry's implementation dependency.
|
||||||
|
- `prometeu-studio` no longer `testImplementation` PBS. No studio test
|
||||||
|
compiled against PBS types.
|
||||||
|
|
||||||
|
Source-walk import/constructor tests were deleted.
|
||||||
|
`FrontendProviderBoundaryTest` keeps only
|
||||||
|
`compileOnlyFrontendProviderMayOmitLanguageService`.
|
||||||
|
|
||||||
|
Specs 19 §11 and 20 now say common/platform code must not depend on types
|
||||||
|
from the PBS frontend module. Matrix rows G19-11.6, G20-4.1.2, and G20-4.3.3
|
||||||
|
point at the ArchUnit rules and the `__pbs.` scan.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Good:
|
||||||
|
|
||||||
|
- ArchUnit failure names the class that depends on a PBS-module type,
|
||||||
|
including a facade in package `p.studio.compiler`.
|
||||||
|
- Registry `bootstrapDefaults()` constructs `PBSFrontendProvider`. That is
|
||||||
|
the allowed composition root.
|
||||||
|
- App calls `FrontendRegistryService.bootstrapDefaults()` and has no PBS
|
||||||
|
project dependency.
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
- Searching source for `import p.studio.compiler.pbs` and calling the
|
||||||
|
boundary protected.
|
||||||
|
- Treating `AppContainer` as the place that may `new PBSFrontendProvider()`.
|
||||||
|
- Identifying PBS by class name prefix, so a future `PbsLike` helper in
|
||||||
|
common code is banned or a PBS facade is missed.
|
||||||
|
- Adding ArchUnit to `java-common-conventions` for every module.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- Same Java package does not mean same Gradle module.
|
||||||
|
`FrontendRegistryService` and `PBSFrontendProvider` both sit in
|
||||||
|
`p.studio.compiler`. Origin is the module path or JAR name.
|
||||||
|
- `@AnalyzeClasses` classes must not mix `@ArchTest` and Jupiter `@Test` on
|
||||||
|
the same class. The ArchUnit engine owns `@ArchTest`.
|
||||||
|
- `DoNotIncludeTests` is required. The architecture-test sources themselves
|
||||||
|
reference PBS types in order to name the allowlist.
|
||||||
|
- Removing PBS from app/lsp compile classpath is safe only because registry
|
||||||
|
still `implementation`s PBS, which is runtime-transitive.
|
||||||
|
- `testImplementation` of PBS on studio is not a production leak, but if no
|
||||||
|
studio test needs PBS types it is still a lying graph. The allowlist test
|
||||||
|
rejects it.
|
||||||
|
- Do not point ArchUnit at the Rust runtime. `__pbs.` in Java source is a
|
||||||
|
string contract, not a type dependency.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Decision: `DEC-0050`
|
||||||
|
- Plan: `PLN-0129`
|
||||||
|
- Related lessons: `LSN-0055`, `LSN-0059`, `LSN-0062`, `LSN-0063`,
|
||||||
|
`LSN-0061`, `LSN-0065`
|
||||||
|
- `docs/specs/compiler/19. Verification and Safety Checks Specification.md`
|
||||||
|
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||||
|
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||||
|
- `prometeu-architecture-tests/src/test/java/p/studio/architecture/PbsModuleBoundaryArchTest.java`
|
||||||
|
- `prometeu-architecture-tests/src/test/java/p/studio/architecture/PbsGradleDependencyAllowlistTest.java`
|
||||||
|
- `prometeu-compiler/prometeu-frontend-registry/src/main/java/p/studio/compiler/FrontendRegistryService.java`
|
||||||
|
- `prometeu-compiler/prometeu-frontend-api/src/test/java/p/studio/compiler/models/IRBackendExecutableContractTest.java`
|
||||||
+167
@@ -0,0 +1,167 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0067
|
||||||
|
ticket: multi-frontend-avoid-premature-abstractions
|
||||||
|
title: Multi-frontend phase rejects premature infrastructure
|
||||||
|
created: 2026-09-19
|
||||||
|
tags: [compiler, compiler-general, studio, frontend, architecture, multi-frontend, simplicity]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Multi-frontend phase rejects premature infrastructure
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
The multi-frontend preparation needed a standing simplicity rule. The original
|
||||||
|
agenda asked for that rule *before* the other multi-frontend discussions.
|
||||||
|
Those discussions already closed (DSC-0054 through DSC-0064). The remaining
|
||||||
|
risk was not a missing plugin platform.
|
||||||
|
|
||||||
|
The remaining risk was twofold:
|
||||||
|
|
||||||
|
1. using "keep it simple" to put PBS construction back into common compiler,
|
||||||
|
Studio, LSP, or app code;
|
||||||
|
2. inventing marketplace, JAR loading, RPC, validator-core, or a generic SPI
|
||||||
|
"for a future language" that does not exist in this repository.
|
||||||
|
|
||||||
|
`FrontendRegistryService` is a static singleton. The original agenda listed
|
||||||
|
a global service locator as out of scope. Without an explicit exception, a
|
||||||
|
later change could inject a `Registry` into the pipeline for purity, which
|
||||||
|
DSC-0063 already refused.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
This is standing policy for *future* work in the current phase: PBS as the
|
||||||
|
only product frontend, `synth` as a test-only provider, frontends in-repo.
|
||||||
|
It is not an audit of closed discussions and must not rewrite them.
|
||||||
|
|
||||||
|
Durable locks from DEC-0051:
|
||||||
|
|
||||||
|
- Implementation of this discussion is the decision plus this lesson. There
|
||||||
|
is no new spec, no new ArchUnit rule, and no production refactor.
|
||||||
|
- Spec 23 §2 and §8.3 remain the discovery MUST NOT surface. Do not copy
|
||||||
|
those sentences into a new spec.
|
||||||
|
- Architectural tests stay owned by LSN-0066.
|
||||||
|
|
||||||
|
### Static registry is allowed
|
||||||
|
|
||||||
|
`FrontendRegistryService` as a static singleton, with public `register` and
|
||||||
|
`unregister` and `bootstrapDefaults()` registering only PBS, is the
|
||||||
|
composition mechanism of this phase. Treat that as an explicit exception,
|
||||||
|
not as a banned service locator.
|
||||||
|
|
||||||
|
Discovery must not use `ServiceLoader`, classpath scanning, reflection-based
|
||||||
|
discovery, an external JAR, or runtime plugin installation.
|
||||||
|
|
||||||
|
Do not inject a `Registry` into the pipeline, LSP, or `AppContainer`.
|
||||||
|
`AppContainer` is not a PBS composition root. It may call
|
||||||
|
`FrontendRegistryService.bootstrapDefaults()`. It must not instantiate PBS
|
||||||
|
types.
|
||||||
|
|
||||||
|
### Real in-repo consumer
|
||||||
|
|
||||||
|
A new interface, module, SPI, generator, or framework is allowed only when
|
||||||
|
a real in-repo consumer exists. In this phase that consumer is one of:
|
||||||
|
|
||||||
|
- the PBS product frontend;
|
||||||
|
- the `synth` test frontend;
|
||||||
|
- a second product frontend accepted by its own decision.
|
||||||
|
|
||||||
|
"For a future language", "for the marketplace", or "when we have plugins"
|
||||||
|
is not a consumer.
|
||||||
|
|
||||||
|
`FrontendProvider`, `IRBackend`, common lifecycle assembly, and test-only
|
||||||
|
ArchUnit are not premature. They already have consumers.
|
||||||
|
|
||||||
|
### Forbidden in this phase
|
||||||
|
|
||||||
|
Until a later decision authorizes it with a real consumer, do not introduce:
|
||||||
|
|
||||||
|
1. dynamic frontend discovery (plugin, `ServiceLoader`, scan, external JAR,
|
||||||
|
runtime install);
|
||||||
|
2. RPC, sockets, a process supervisor, or version negotiation between
|
||||||
|
compiler and frontend;
|
||||||
|
3. a marketplace, hot reload, or frontend sandbox;
|
||||||
|
4. a validator-core or generic validation framework;
|
||||||
|
5. an SDK schema/generator or `HOSTCALLS.csv` as canonical ABI (LSN-0064);
|
||||||
|
6. a product module `frontends/synth`;
|
||||||
|
7. an injected `Registry`, or `AppContainer` as the PBS composition root.
|
||||||
|
|
||||||
|
This list is not a monorepo-wide simplicity charter. It does not govern
|
||||||
|
JavaFX, packer, or LSP protocol design. Owner is `compiler/general`, with
|
||||||
|
impact on `studio` on the multi-frontend axis.
|
||||||
|
|
||||||
|
### Neighbors stay closed
|
||||||
|
|
||||||
|
Do not reinterpret, relax, "simplify", or reimplement:
|
||||||
|
|
||||||
|
- provider/registry (LSN-0055 / spec 23 §8.3);
|
||||||
|
- common lifecycle;
|
||||||
|
- console ABI / PBS delivery;
|
||||||
|
- `synth`;
|
||||||
|
- ArchUnit / PBS module identity.
|
||||||
|
|
||||||
|
Using this policy to keep `new PBSFrontendPhaseService()` (or equivalent)
|
||||||
|
in common code is refused. That is PBS recoupling, not simplicity.
|
||||||
|
|
||||||
|
A second product frontend needs its own decision. This lesson neither
|
||||||
|
replaces that decision nor blocks it.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
No production Java, Gradle, spec, or ArchUnit file changed.
|
||||||
|
|
||||||
|
The map above is the implementation. Future compiler/studio plans on this
|
||||||
|
axis should cite it when they propose a new module, SPI, or discovery
|
||||||
|
mechanism.
|
||||||
|
|
||||||
|
Code that already matches the phase:
|
||||||
|
|
||||||
|
- `FrontendProvider` exposes `specification()`, `compiler()`, and optional
|
||||||
|
`languageService()`;
|
||||||
|
- `FrontendRegistryService.bootstrapDefaults()` registers PBS only;
|
||||||
|
- `AppContainer` only calls that bootstrap;
|
||||||
|
- `synth` lives in build-pipeline test sources;
|
||||||
|
- ArchUnit lives in `:prometeu-architecture-tests`.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Good:
|
||||||
|
|
||||||
|
- add a method to `FrontendProvider` because PBS or `synth` cannot compile
|
||||||
|
or register without it;
|
||||||
|
- keep `unregister` on the static registry so `synth` tests can clean up;
|
||||||
|
- reject a proposal to load language JARs from a plugin directory.
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
- inject `Registry` into `BuilderPipelineService` because static state looks
|
||||||
|
like a service locator;
|
||||||
|
- create `frontends/synth` as a product module;
|
||||||
|
- add validator-core "so the next language has somewhere to put checks";
|
||||||
|
- keep `new PBSFrontendPhaseService()` in pipeline code and call that
|
||||||
|
simpler than going through the provider.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- The original agenda order ("before the other agendas") is historical.
|
||||||
|
Do not reopen DSC-0054..DSC-0064 to satisfy it.
|
||||||
|
- Static registry plus explicit `register`/`unregister` is visible. Hidden
|
||||||
|
`ServiceLoader` discovery is not the same thing.
|
||||||
|
- A second product frontend *is* a real consumer. Do not use this lesson to
|
||||||
|
refuse that frontend; use it to refuse infrastructure that frontend does
|
||||||
|
not yet need.
|
||||||
|
- Spec 23 already forbids plugin discovery. Do not duplicate it. Do not
|
||||||
|
treat silence in spec 23 as permission for RPC or validator-core.
|
||||||
|
- Simplicity does not mean PBS may leak into common modules. LSN-0066 still
|
||||||
|
owns that boundary.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Decision: `DEC-0051`
|
||||||
|
- Plan: `PLN-0130`
|
||||||
|
- Related lessons: `LSN-0055`, `LSN-0060`, `LSN-0063`, `LSN-0064`,
|
||||||
|
`LSN-0065`, `LSN-0066`
|
||||||
|
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||||
|
(§2, §8.3)
|
||||||
|
- `prometeu-compiler/prometeu-frontend-registry/src/main/java/p/studio/compiler/FrontendRegistryService.java`
|
||||||
|
- `prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/FrontendProvider.java`
|
||||||
|
- `prometeu-app/src/main/java/p/studio/AppContainer.java`
|
||||||
+70
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0074
|
||||||
|
ticket: pbs-lsp-remaining-editor-surface
|
||||||
|
title: PBS remaining editor surface is frontend-owned and transported by the LSP
|
||||||
|
created: 2026-09-22
|
||||||
|
tags: [studio, lsp, vscode, compiler-pbs, editor]
|
||||||
|
---
|
||||||
|
|
||||||
|
# PBS remaining editor surface is frontend-owned and transported by the LSP
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
Nine open LSP agendas still described formatting, imports, semantic tokens, snapshots, completion, folding, diagnostics, document links, and call hierarchy as if none of that surface existed. By the time those agendas were still open, the server already advertised hover, completion, signature help, definition, references, outline, workspace symbols, rename, quick fix, and full semantic tokens. Each request still rebuilt analysis. References and rename had already shipped without a snapshot cache. There was no diagnostic whose meaning was "this name is not imported."
|
||||||
|
|
||||||
|
Treating the nine agendas as nine decisions would have reimplemented finished work and locked stale premises.
|
||||||
|
|
||||||
|
## Consolidated Decision
|
||||||
|
|
||||||
|
`DEC-0058` retired that split. One plan, `PLN-0137`, landed seven steps. The frontend produces the editorial result. The LSP transports it and does not invent a second policy. A missing capability is not advertised and returns an empty list, not a protocol error.
|
||||||
|
|
||||||
|
The wave explicitly does not add a project snapshot cache, type hierarchy, `completionItem/resolve`, snippets, a ranking score, range or on-type formatting, organize imports, a missing-import quick fix, `relatedInformation`, or a new semantic-token key.
|
||||||
|
|
||||||
|
1. Published editor diagnostic `source` is the bound frontend `languageId`. For PBS that is `pbs`. `code` stays the stable compiler code. The code is not copied into `source`.
|
||||||
|
2. A document link covers only the span of a `ModuleRef` whose module assembly already resolved to a regular file. Virtual stdlib and unresolved modules produce no link.
|
||||||
|
3. Folding comes from recovered spans of the listed declarations, their bodies, parameter lists, and `Doc` text blocks. A brace, parenthesis, or text block the tree does not cover still folds, including an unmatched opener through the end of the text. Selection grows outward from identifier, to argument or parameter list, to block or `Doc` text block, to declaration.
|
||||||
|
4. Formatting is full-document only. It reprints the token stream, indents by four spaces where brace or parenthesis nesting changes, leaves `Doc` text-block interiors untouched, and does not reorder declarations or move comments off their line.
|
||||||
|
5. Semantic tokens keep `PBSSemanticTokenProvider` as the baseline. Hover resolution may replace an identifier token only when an existing `PbsSemanticKind` matches the symbol. Failure, a broken file, or a symbol with no existing key keeps the baseline token.
|
||||||
|
6. Completion inside a `ModuleRef` lists project and stdlib modules the current resolver can already name. Every other offset keeps the existing member or general completion. Items stay eager and `resolveProvider` stays false.
|
||||||
|
7. Call hierarchy walks `CallExpr` nodes for functions and methods. It does not use the references index. A cursor that is not on a callable is empty. Type hierarchy is not advertised.
|
||||||
|
|
||||||
|
## Final Implementation
|
||||||
|
|
||||||
|
`CompilerLanguageServiceBridge` reads `LspProjectContext.languageId` into `BaselineDocumentIssue.source`. Document links read the physical module map that module assembly already built; stdlib files under `/virtual/stdlib` are not regular files, so they are not links. Folding, selection, and formatting reparse the open buffer with the existing lexer and parser. They do not require a successful project analysis. The semantic-token overlay runs only when editorial context is available and otherwise returns the provider tokens, including when project discovery fails. Module completion labels are the project modules from that same physical map plus the modules `ResourceStdlibEnvironmentResolver` can already resolve. Call hierarchy collects function, method, and constructor declarations from the recovered AST and matches `CallExpr` callees by name and call shape.
|
||||||
|
|
||||||
|
Spec 23 §8.3 states each of these rules. The nine earlier agendas, `AGD-0048` through `AGD-0056`, were abandoned and are not normative.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
A project import `@app:a` that resolves to `src/a/source.pbs` is one document link on that module-reference span. `@sdk:log` is not, because the stdlib file is virtual.
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn helper() -> int { return 1; }
|
||||||
|
fn main() -> int { return helper; }
|
||||||
|
```
|
||||||
|
|
||||||
|
The use of `helper` without a call is an identifier in the lexical pass. Hover resolves it as a function, so the overlay key is `pbs-function`. A local such as `value` has no existing key, so it stays `pbs-identifier`.
|
||||||
|
|
||||||
|
```pbs
|
||||||
|
fn helper() -> int { return 1; }
|
||||||
|
fn main() -> int { return helper(); }
|
||||||
|
```
|
||||||
|
|
||||||
|
Prepare on `main` returns that function. Outgoing calls include `helper`. Incoming calls of `helper` include `main`. A cursor on a struct name returns no item.
|
||||||
|
|
||||||
|
## Common Pitfalls
|
||||||
|
|
||||||
|
- Do not copy the diagnostic code into `source`. The editor then shows the code twice and loses the language id.
|
||||||
|
- Do not build document links to `/virtual/stdlib`. Definition already refuses that destination.
|
||||||
|
- Do not treat document symbols as folding ranges. Outline and folding are different payloads.
|
||||||
|
- Do not pretty-print from the AST. Comments and `Doc` text-block interiors are not fully modeled as trivia on the tree.
|
||||||
|
- Do not add `pbs-local`, `pbs-parameter`, or `pbs-field` in the overlay. Those symbols stay on the baseline token until a later decision adds the key.
|
||||||
|
- Do not implement call hierarchy by inverting the references index. A reference is a use of a name, not a call.
|
||||||
|
- Do not start a snapshot cache because a later feature feels slow. This wave deliberately kept request-local analysis.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- `DEC-0058` and `PLN-0137`, removed by housekeeping after this lesson
|
||||||
|
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md` §8.3
|
||||||
|
- Earlier surface: `LSN-0068`, `LSN-0069`, `LSN-0070`, `LSN-0071`, `LSN-0072`, `LSN-0073`
|
||||||
|
- Abandoned agendas: `AGD-0048` through `AGD-0056`
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0075
|
||||||
|
ticket: studio-core-javafx-decoupling
|
||||||
|
title: Studio Services Must Outlive the Current UI
|
||||||
|
created: 2026-09-25
|
||||||
|
tags: [studio, architecture, spring, spring-modulith, javafx, adapters]
|
||||||
|
---
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Prometeu Studio began as a desktop application in which JavaFX controls, application workflows, provider integrations, background execution, and lifecycle management shared one Gradle module. A static `p.studio.Container` made these dependencies easy to reach, but it also made the visual adapter the practical center of the product. That shape could not support another consumer, such as a future agent adapter, without either driving the UI or duplicating Studio behavior.
|
||||||
|
|
||||||
|
The migration needed to preserve the existing Java product and its behavior while making JavaFX replaceable. It also needed to preserve the autonomy of compiler, LSP, runtime, and especially `p.packer`; separating Studio did not authorize absorbing those domains.
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
### Human and non-visual adapters consume the same Studio services
|
||||||
|
|
||||||
|
**What:** The Studio is physically divided into `prometeu-studio-api`, `prometeu-studio-core`, `prometeu-studio-ui-javafx`, and `prometeu-app`. JavaFX depends on the neutral API, Core implements application use cases, and the application module composes concrete adapters.
|
||||||
|
|
||||||
|
**Why:** The stable boundary is UI versus application services, not JavaFX versus a future web framework. A future agent can depend on the same API without moving application rules out of Core.
|
||||||
|
|
||||||
|
**Trade-offs:** More constructor parameters and explicit contracts are required. That cost is intentional: dependencies are visible, testable, and constrained by Gradle instead of hidden behind a global container.
|
||||||
|
|
||||||
|
### Spring is a composition mechanism, not a domain dependency
|
||||||
|
|
||||||
|
**What:** Spring Boot runs in non-web mode only in `prometeu-app`. Core objects remain constructor-injected POJOs. Spring Modulith verifies the six functional Core modules: project, session, assets, shipper, runtime, and execution.
|
||||||
|
|
||||||
|
**Why:** Spring provides deterministic construction and lifecycle without contaminating the public API or Core. Modulith supplies executable documentation and dependency checks while Gradle remains the physical classpath boundary.
|
||||||
|
|
||||||
|
**Trade-offs:** The application configuration is deliberately explicit. Broad component scanning and turning JavaFX controls into Spring singletons would recreate hidden ownership and lifecycle problems.
|
||||||
|
|
||||||
|
### Provider boundaries follow stability, not uniformity
|
||||||
|
|
||||||
|
**What:** Core uses a provider's public API directly when it is stable and neutral. It owns a narrow port when the available integration is static, concrete, lifecycle-oriented, or otherwise unsuitable for Core. Packer's stable API is consumed directly; compiler static access, LSP lifecycle, and runtime process integration are isolated behind consumer-owned gateways implemented in `prometeu-app`.
|
||||||
|
|
||||||
|
**Why:** Wrapping every dependency creates redundant abstractions, while importing concrete implementations leaks infrastructure into Core. The useful boundary depends on the provider contract.
|
||||||
|
|
||||||
|
**Trade-offs:** The integration matrix must be reviewed case by case. There is no universal rule that every provider receives a gateway.
|
||||||
|
|
||||||
|
### Long-running work is a neutral application contract
|
||||||
|
|
||||||
|
**What:** Build, pack, and execution expose `OperationHandle<R>` with identity, snapshots, completion, cancellation, updates, and typed results. The application owns the executor implementation; JavaFX only projects operation state and switches to the FX thread.
|
||||||
|
|
||||||
|
**Why:** Background work must be equally consumable by JavaFX and future adapters. An executor or JavaFX `Task` is an implementation detail, not an application contract.
|
||||||
|
|
||||||
|
**Trade-offs:** Cancellation races and terminal state transitions require explicit tests. In particular, stopping execution must cancel the outer execution handle before its nested preparation handle can complete it successfully.
|
||||||
|
|
||||||
|
## Patterns and Algorithms
|
||||||
|
|
||||||
|
The dependency pattern is:
|
||||||
|
|
||||||
|
```text
|
||||||
|
JavaFX adapter ---> Studio API <--- future adapters
|
||||||
|
^
|
||||||
|
|
|
||||||
|
Studio Core
|
||||||
|
^
|
||||||
|
|
|
||||||
|
Spring non-web composition
|
||||||
|
```
|
||||||
|
|
||||||
|
External providers remain outside the Core module graph. Stable public provider APIs may be direct Core dependencies; concrete adapters remain in the application module.
|
||||||
|
|
||||||
|
Operational failures that a caller can recover from are returned as typed results or diagnostics. For example, metadata writes convert I/O failures into `AssetMetadataWriteResult`. JavaFX renders that result and does not treat an unexpected exception message or stack trace as a functional contract.
|
||||||
|
|
||||||
|
The removal sequence for a service locator is also reusable:
|
||||||
|
|
||||||
|
1. establish architecture tests and final modules;
|
||||||
|
2. introduce neutral contracts and explicit factories;
|
||||||
|
3. move behavior slice by slice into constructor-injected services;
|
||||||
|
4. reduce static call sites to zero;
|
||||||
|
5. delete the static container and manual composition together;
|
||||||
|
6. remove the mixed legacy module;
|
||||||
|
7. run the full build, packaging, desktop smoke, and shutdown gate as one indivisible acceptance step.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- Renaming packages without changing Gradle dependencies does not create a replaceable frontend.
|
||||||
|
- Replacing `Container` with `ApplicationContext.getBean()` throughout the code is still a service locator. Context lookup belongs only at the explicit application bootstrap boundary.
|
||||||
|
- Registering every control or dialog as a Spring singleton gives Spring ownership of visual lifecycle and makes multiple windows or future adapters harder.
|
||||||
|
- A gateway that merely mirrors a stable provider API adds indirection without protection. Conversely, direct use of static or concrete provider entry points leaks infrastructure into Core.
|
||||||
|
- Moving Packer behavior into `p.studio.core.assets` would reverse domain ownership. Studio coordinates Packer; `p.packer` remains independently consumable.
|
||||||
|
- Returning raw exception messages to JavaFX turns implementation accidents into an unstable user-facing protocol. Expected failures need neutral results or diagnostics.
|
||||||
|
- Marking the migration complete after compilation alone misses packaging, restoration, real JavaFX interaction, cancellation, and shutdown leaks.
|
||||||
|
|
||||||
|
## Takeaways
|
||||||
|
|
||||||
|
- The durable product boundary is the Studio service surface, not the current frontend technology.
|
||||||
|
- Spring belongs in composition; Spring Modulith belongs in verification and documentation; neither belongs in the neutral API.
|
||||||
|
- Gradle modules enforce physical isolation, while functional Core modules express ownership and allowed dependencies.
|
||||||
|
- JavaFX is an equivalent adapter, not the owner of project, asset, build, runtime, or execution rules.
|
||||||
|
- `Container` removal is a completion criterion, not an optional cleanup step.
|
||||||
|
- A future agent module can now be added as another API consumer without revisiting this migration or coupling AI concerns to JavaFX.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Decision: `DEC-0059` — Separate Studio Core from JavaFX with Spring Boot non-web and Spring Modulith.
|
||||||
|
- Plan: `PLN-0138` — Complete Studio Core and JavaFX Boundary Migration.
|
||||||
|
- Studio architecture: `docs/specs/studio/9. Studio Core and Adapter Architecture Specification.md`.
|
||||||
|
- Studio specifications: `docs/specs/studio/README.md`.
|
||||||
|
- Packer boundary: `docs/specs/packer/1. Domain and Artifact Boundary Specification.md`.
|
||||||
|
- Packer integration: `docs/specs/packer/5. Diagnostics, Operations, and Studio Integration Specification.md`.
|
||||||
+303
@@ -0,0 +1,303 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0076
|
||||||
|
ticket: studio-headless-runtime-ai-first
|
||||||
|
title: AI-first Studio Through Shared Authority and Headless Evidence
|
||||||
|
created: 2026-09-29
|
||||||
|
tags: [studio, runtime, headless, ai, mcp, automation]
|
||||||
|
---
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Owner: **studio**, with runtime preparation in `../runtime` and language-owned PBS
|
||||||
|
documentation/LSP integration. DSC-0068, accepted DEC-0060 and PLN-0139 delivered
|
||||||
|
28 ordered steps: runtime (01–07), DEV/shared services (08–14), MCP (15–21), and
|
||||||
|
real integration/acceptance (22–28). Those workflow identifiers are historical
|
||||||
|
references; maintained contracts live in the specs linked below.
|
||||||
|
|
||||||
|
The original headless host was an in-process runtime API. Studio's human Debug
|
||||||
|
was useful, but neither a public automation protocol nor a safe authority boundary
|
||||||
|
for another editor. The goal was an external coding agent able to learn PBS,
|
||||||
|
edit a game, build/run it, see its pixels and iterate while the developer watches.
|
||||||
|
A complete gameplay library or embedded AI chat was not a prerequisite.
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
### Separate ownership, not parallel implementations
|
||||||
|
|
||||||
|
The external coding client owns conversation, model/provider, native file edits
|
||||||
|
and budget. Studio owns project authority, build orchestration, process supervision
|
||||||
|
and the shared observation model. Runtime owns execution and framebuffer semantics.
|
||||||
|
The language frontend/SDK owns its references; the existing project LSP owns semantic
|
||||||
|
queries. DEV and MCP consume the same neutral services.
|
||||||
|
|
||||||
|
```text
|
||||||
|
External coding agent -- local MCP HTTP --> Studio API/Core <-- DEV (JavaFX)
|
||||||
|
|
|
||||||
|
compiler/packer + existing LSP
|
||||||
|
|
|
||||||
|
supervised runtime JSONL/stdio
|
||||||
|
|
|
||||||
|
canonical PNG + frame identity
|
||||||
|
```
|
||||||
|
|
||||||
|
The configured installation provides `prometeu headless --stdio`. UTF-8 JSONL is
|
||||||
|
versioned, bounded and protocol-only on stdout; logs belong on stderr. A process
|
||||||
|
contains one session, with no implicit conflicting-work queue. Handshake establishes
|
||||||
|
runtime/protocol versions, capabilities and effective limits. Human Debug keeps its
|
||||||
|
own host/protocol. API/Core do not depend on JavaFX, Spring, HTTP/MCP or wire DTOs.
|
||||||
|
|
||||||
|
This avoids a provider adapter inside Studio and avoids automating the human debugger
|
||||||
|
as the execution API. The deliberate cost is an explicit process boundary and
|
||||||
|
reconfiguration of the external client after Studio restarts.
|
||||||
|
|
||||||
|
### Connection, authority and operation receipts are different identities
|
||||||
|
|
||||||
|
Authentication to loopback `/mcp` permits discovery/context/reference reads, not
|
||||||
|
editing authority. A human grants a specific project in DEV; acquisition then
|
||||||
|
returns a task identity. Manual Debug and agent work exclude each other in services,
|
||||||
|
not only through disabled UI buttons. Waiting for acquisition already blocks
|
||||||
|
conflicting manual work. A disconnected client does not release the project.
|
||||||
|
|
||||||
|
An operation's `clientRequestId` deduplicates a build or advance within the task.
|
||||||
|
The same ID and parameters return the same operation; changing parameters fails.
|
||||||
|
Lookup recovers a lost receipt without replaying frames. These records are in-memory,
|
||||||
|
not a source journal or restart-recovery mechanism. Runtime wire correlation has
|
||||||
|
its own `requestId`; neither identity is a substitute for valid task authority.
|
||||||
|
|
||||||
|
### Return is a cleanup barrier
|
||||||
|
|
||||||
|
The sequence is: invalidate task authority → stop managed work/processes → refresh
|
||||||
|
open documents from saved files → enable manual control. A late result cannot publish
|
||||||
|
a new capture or restore authority. Closing only DEV does not end the task; closing
|
||||||
|
the project/app does. Reopening starts manual, never with recovered agent authority.
|
||||||
|
|
||||||
|
Compile errors, guest faults and runtime loss remain distinct outcomes. The first
|
||||||
|
two permit correction within the same task. Runtime loss requires explicit session
|
||||||
|
replacement, not replay. Forced cleanup reports infrastructure failure first; a
|
||||||
|
later explicit reclaim may acknowledge success only after the process tree is dead.
|
||||||
|
|
||||||
|
The adversarial gate exposed a real app-teardown gap: UI closure alone did not own
|
||||||
|
every project session. The project-session factory now tracks and closes sessions
|
||||||
|
before dependent executors/LSP are destroyed, attempts other sessions after a failure,
|
||||||
|
and rejects new opens once closure begins. Cancellation also tolerates a concurrent
|
||||||
|
writer/timer shutdown so that it cannot bypass cleanup waiting.
|
||||||
|
|
||||||
|
### Direct edits require truthful boundaries
|
||||||
|
|
||||||
|
The agent edits actual project files. No worktree, merge/apply stage, code rollback,
|
||||||
|
Git cleanliness gate or automatic commit is imposed. Studio offers save-all-and-grant
|
||||||
|
for its dirty buffers and refreshes from disk on return. External unsaved buffers,
|
||||||
|
concurrent native writes and Git discipline remain the developer's responsibility.
|
||||||
|
Revocation cannot stop an external process from writing files directly; the developer
|
||||||
|
must also stop that client. SDK/external libraries are readable, not editable by
|
||||||
|
the game task. Read-only semantic refactoring scopes are enforced by the adapter.
|
||||||
|
|
||||||
|
### Pixels are evidence; metadata explains which evidence
|
||||||
|
|
||||||
|
MCP returns the lossless canonical PNG as native image content, plus session/build,
|
||||||
|
logical frame, render FrameId, dimensions, stride and pixel format. DEV projects
|
||||||
|
the same capture, with an explicit stale label after edits/rebuild/session changes.
|
||||||
|
Logical frames and render frames are independent counters. Neither a hash nor a
|
||||||
|
desktop screenshot replaces framebuffer pixels. Captures do not travel through
|
||||||
|
temporary image files, and there is no continuous video requirement.
|
||||||
|
|
||||||
|
Default bounds are 600 frames/advance, 64 KiB/command, 32 MiB/response including
|
||||||
|
image/envelope, 5 s handshake, 60 s call, and 5 s cancel/shutdown grace. Oversized
|
||||||
|
requests fail rather than clamp. Deadlines supervise processes, not simulated time.
|
||||||
|
|
||||||
|
## Final Result and Acceptance Evidence
|
||||||
|
|
||||||
|
All 28 plan steps completed on the tested platform. Production exposes 17 MCP
|
||||||
|
tools, live DEV configuration-copy, shared task authority, existing LSP/build,
|
||||||
|
indexed offline language references and the supervised real Rust headless host.
|
||||||
|
There is no production fake, embedded agent/chat, generic MCP editor/shell or
|
||||||
|
provider-specific runtime behavior.
|
||||||
|
|
||||||
|
### Requirement-to-evidence map
|
||||||
|
|
||||||
|
| Requirement and steps | Evidence retained in code or acceptance record |
|
||||||
|
| --- | --- |
|
||||||
|
| Runtime contract, commands, limits, determinism; 01–07 | Runtime `automation_process.rs`, headless tests, published request/response schemas and packaged-installation smoke |
|
||||||
|
| Neutral architecture; 08, 14, 15, 27 | Studio specs 9–11; architecture/Modulith tests, 17 passing cases in final full rerun |
|
||||||
|
| Grant/revoke, symmetric locks, dirty-buffer handoff; 09–14 | `DefaultAutomationSessionTest`, Core execution/session tests, `DevDesktopTest`, `DevWorkspaceProjectionTest` |
|
||||||
|
| HTTP authentication/Origin/restart and real config; 16, 21 | `LocalMcpServerTest`, `McpContractTest`, `McpConnectionGuideTest`; packaged restart rejects prior credential |
|
||||||
|
| Manifest context, unknown languages/versions, indexed offline docs; 17–18 | `CompilerProjectKnowledgeTest`, `CompilerProjectLanguageCatalogTest`, `InstalledKnowledgeTest` |
|
||||||
|
| Saved-source LSP and dependency navigation; 19 | `AutomationLspQueriesTest`, including `externalDependencyNavigationIsReadableButRefactoringIsReadOnly`; SDK limitation remains explicit below |
|
||||||
|
| Task operations, lost receipts, deduplication; 20–21 | `McpTaskToolsTest`, Core operation tests; reconnect/duplicate advance in real desktop HTTP gate |
|
||||||
|
| Real supervision/build/corrective iterations; 22–23 | `HeadlessProcessSessionTest`, `HeadlessInstalledRuntimeTest`, `HeadlessTaskIntegrationTest` |
|
||||||
|
| Runtime/MCP/DEV pixel and identity parity; 24 | `HeadlessMcpDesktopTest` + independent `DirectHeadlessOracle`; compare every ImageView pixel, PNG bytes, metadata, reset/fresh-session/rebuild |
|
||||||
|
| Interruption/cleanup/Debug regression; 25 | Nine real HTTP/runtime/DEV tests, including crash, forced shutdown, app close, stale-result rejection and real manual Debug; controlled document participant makes refresh barrier observable |
|
||||||
|
| Real coding client and human confirmation; 26 | Codex CLI 0.158.0 run described below; developer confirmed DEV and manual Debug Play |
|
||||||
|
| Full regression and distribution; 27 | Commands/counts below; installed references and two extracted-ZIP application lifecycle cycles |
|
||||||
|
| Final propagation and handoff; 28 | This lesson, updated spec 11 delivery boundary, README troubleshooting, CLI validation and housekeeping |
|
||||||
|
|
||||||
|
### Real external-client example
|
||||||
|
|
||||||
|
The developer granted control in `../ai-first-smoke` and copied the descriptor.
|
||||||
|
Codex CLI 0.158.0 used a fresh ephemeral session, only the configured Studio MCP,
|
||||||
|
project-root workspace-write isolation and its approval-review mechanism. Default
|
||||||
|
noninteractive approval policy initially blocked acquisition before any edit; the
|
||||||
|
retry retained sandboxing and did not bypass the human grant. The configured default
|
||||||
|
model was used; this record does not assert an independently verified model identity.
|
||||||
|
Credentials stayed out of versioned files and reports.
|
||||||
|
|
||||||
|
The agent consulted language/SDK references, edited only `src/main.pbs`, queried
|
||||||
|
LSP, built/packed and consumed native MCP image blocks. It changed the bundled
|
||||||
|
16x16 orange rectangle to one-pixel/frame directional movement in a 480x270 frame,
|
||||||
|
with no idle movement, opposing directions canceled before clamping, and unchanged
|
||||||
|
colors. Both builds succeeded; diagnostics were empty; final guest fault was null.
|
||||||
|
The 77 MCP calls included rejected/recovered calls and 13 native image blocks.
|
||||||
|
|
||||||
|
| Scenario | Logical frame / FrameId | Client-reported observed position |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Idle for 10 frames | 10 / 9 | (0,32) |
|
||||||
|
| Right 20; down 20 | 30 / 29; 50 / 49 | (20,32); (20,52) |
|
||||||
|
| Left 10; up 10 | 60 / 59; 70 / 69 | (10,52); (10,42) |
|
||||||
|
| Horizontal then vertical opposites, 10 each | 80 / 79; 90 / 89 | (10,42), unchanged |
|
||||||
|
| Right + down, 500 | 590 / 589 | (464,254), intact at bottom-right |
|
||||||
|
| All directions, 10 | 600 / 599 | (464,254), unchanged at edge |
|
||||||
|
| Left + up, 500; idle 10 | 1100 / 1099; 1110 / 1109 | (0,0), intact at top-left |
|
||||||
|
|
||||||
|
Build ID: `da441f65-479b-4099-8b86-fe48c7750e76`; runtime session:
|
||||||
|
`aa089209ec22c9a07286e5b01e967a57`. Frame identities/statuses were checked in tool
|
||||||
|
evidence; positions are the coding client's visual observations, not an invented
|
||||||
|
independent pixel measurement. Step 24 separately supplies exhaustive pixel parity.
|
||||||
|
Release returned MANUAL, no headless host remained, and game edits were preserved.
|
||||||
|
The developer confirmed the DEV result and successfully played the game through
|
||||||
|
normal Debug afterward. No game commit was made automatically.
|
||||||
|
|
||||||
|
### Builds, commands and scope
|
||||||
|
|
||||||
|
Studio executable code was `e6a83c94`; acceptance/troubleshooting documentation
|
||||||
|
was committed as `4c3597a2`. Runtime is merged at `01fab56`, distribution 0.1.0,
|
||||||
|
protocol 1.0. Native acceptance was **macOS ARM64 only**; no other coding client,
|
||||||
|
operating system or native-installer matrix is claimed.
|
||||||
|
|
||||||
|
Studio final commands:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./gradlew test build :prometeu-app:installDist --max-workers=2 --console=plain
|
||||||
|
./gradlew test :prometeu-app:installedKnowledgeTest :prometeu-app:headlessProcessTest --rerun-tasks -PstudioRuntimeInstall=/absolute/path/to/runtime --max-workers=2 --console=plain
|
||||||
|
```
|
||||||
|
|
||||||
|
The forced rerun executed all 91 tasks: normal suite **803 passed, 15 pre-existing
|
||||||
|
disabled tests, zero failures/errors**; installed knowledge **1 passed**; real
|
||||||
|
headless integration **4 passed**. The disabled compiler classes were
|
||||||
|
`IRVMIntrinsicRegistryParityTest`, `BackendGateIIntegrationTest` and
|
||||||
|
`MainProjectPipelineIntegrationTest`; none was disabled for this delivery.
|
||||||
|
The earlier step 25 targeted run had **254 passing tests**, including 9 real
|
||||||
|
HTTP/runtime/DEV and 4 DEV/Debug desktop tests. These overlap the full suite and
|
||||||
|
must not be added together as unique tests.
|
||||||
|
|
||||||
|
The Studio ZIP was extracted outside the checkout. A test-only JavaFX probe loaded
|
||||||
|
only its distribution JARs, delegated to the real App init/start/stop, used isolated
|
||||||
|
preferences, and passed two shown-launcher/closed-listener cycles, credential
|
||||||
|
renewal and old-token rejection. It did not operate the developer's open window.
|
||||||
|
ZIP SHA-256: `256f80b25416c284dca58e5519fdde0be36e9a6a2a450cb58f9c453862188c8d`.
|
||||||
|
|
||||||
|
Runtime final commands (cwd `../runtime`, separate temporary Cargo target):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo test --workspace --offline --quiet
|
||||||
|
PROMETEU_PROTOCOL_TEST_INSTALL=/absolute/path/to/runtime cargo test -p prometeu-cli --offline --test automation_process -- --include-ignored
|
||||||
|
cargo test -p prometeu-host-desktop-winit --offline --lib -- --ignored
|
||||||
|
```
|
||||||
|
|
||||||
|
Workspace **678 passed**, with six opt-in tests ignored there; separate runs passed
|
||||||
|
all **13** process/protocol cases including the installed package, and all **5**
|
||||||
|
localhost Debug cases. Twelve process cases overlap the workspace result. The
|
||||||
|
runtime package was built during preparatory delivery; the final gate reused and
|
||||||
|
validated it rather than claiming a fresh distribution build. Installed headless
|
||||||
|
SHA-256: `24b74712397545ddd7f745daded859c12d19102f81c5b51bf46c202fb8d6b65d`.
|
||||||
|
|
||||||
|
## Deferred Findings — Return Here After Implementation
|
||||||
|
|
||||||
|
The user requested deferred investigation, not silent removal of these findings.
|
||||||
|
|
||||||
|
| Finding | Owner and next investigation |
|
||||||
|
| --- | --- |
|
||||||
|
| `Input.pad()` SDK definition returns no location | Investigated on 2026-09-29: editorial lookup succeeds, but the physical-file policy filters the virtual SDK source. A separate chained-call editorial limitation was reproduced; see below. No runtime defect or fix is claimed. |
|
||||||
|
| Oversized reference page produces generic `-32602` | Studio MCP: improve parameter-limit discoverability/error specificity; default pagination already works. |
|
||||||
|
| Concurrent capture/fault/state may return BUSY | Studio MCP/Core: review concurrency guidance and clarity. Sequential calls work; do not weaken accepted exclusivity implicitly. |
|
||||||
|
| Framebuffer dimensions were discovered from capture | Language/runtime documentation: improve discovery; this does not prove dimensions are absent from every reference. |
|
||||||
|
| JDK 25/Kotlin target-24 fallback, JavaFX module/native-access/Unsafe warnings | Build/desktop tooling: review supported toolchain alignment and startup options separately. Passing tests do not erase warnings. |
|
||||||
|
| UI automation helper required newer Node than 22.13.1 | Environment tooling, not Studio: upgrade only as separate authorized work; human DEV confirmation supplied acceptance. |
|
||||||
|
| macOS ARM64 + Codex is the validated matrix | Future interoperability/platform testing; no uniform Grok/Windows/Linux promise. |
|
||||||
|
|
||||||
|
`NO_FRAME_AVAILABLE` before the first completed frame and client permission prompts
|
||||||
|
are expected boundaries, not guest defects. The shutdown ownership/reclaim bugs
|
||||||
|
found during step 25 are fixed and tested, not outstanding issues.
|
||||||
|
|
||||||
|
### Follow-up Investigation: SDK Navigation and Chained Calls
|
||||||
|
|
||||||
|
Owner: `compiler/pbs`, with propagation to compiler tooling contracts and Studio/LSP
|
||||||
|
consumers. This diagnosis does not reopen the completed AI-first delivery or change
|
||||||
|
its accepted requirements.
|
||||||
|
|
||||||
|
On 2026-09-29, a temporary Java probe exercised `CompilerLanguageServiceBridge`
|
||||||
|
with a request-local PBS overlay on `test-projects/main/src/main.pbs`, using the
|
||||||
|
application runtime classpath. It compared raw PBS editorial locations, exported
|
||||||
|
frontend locations, final LSP definitions, and hover. No production source was
|
||||||
|
changed. The comparison included imports from `@sdk:input` and `@sdk:gfx`, a local
|
||||||
|
`helper()`, an explicitly typed `pad: InputPad`, and `button: InputButton`.
|
||||||
|
|
||||||
|
| Cursor target | Raw PBS locations | Frontend / LSP locations | Hover |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Local `helper()` | 1 | 1 / 1 | Resolved |
|
||||||
|
| `pad` in `Input.pad()` | 1 | 0 / 0 | `pad() -> InputPad` |
|
||||||
|
| `left` in `pad.left()` | 1 | 0 / 0 | `left() -> InputButton` |
|
||||||
|
| `down` in `button.down()` | 1 | 0 / 0 | `down() -> bool` |
|
||||||
|
| `down` in `pad.left().down()` | 0 | 0 / 0 | No symbol information |
|
||||||
|
| `left` and `down` in `Input.pad().left().down()` | 0 each | 0 / 0 each | No symbol information |
|
||||||
|
| `clear` in `Gfx.clear(0)` | 1 | 0 / 0 | Resolved |
|
||||||
|
|
||||||
|
There are two separate causes:
|
||||||
|
|
||||||
|
1. **SDK destination policy, not failed lookup.** `InterfaceModuleLoader` registers
|
||||||
|
SDK declarations under `/virtual/stdlib/sdk/input/main.pbs` (and the corresponding
|
||||||
|
`gfx` path). The source handle can read the declaration text, but the path is not
|
||||||
|
a physical file. `PBSFrontendLanguageService.toFrontendLocation` explicitly
|
||||||
|
rejects it via `Files.isRegularFile`. The LSP bridge also reads destination text
|
||||||
|
from disk; removing the frontend check alone would not deliver a usable target.
|
||||||
|
This behavior follows Compiler Spec 23 §8.3 and the physical-file rule preserved
|
||||||
|
in `LSN-0068`, and already has an explicit `Gfx.clear()` regression assertion in
|
||||||
|
`CompilerLanguageServiceBridgeTest.definitionUsesEditorialLookupAndPhysicalStdlibFiles`.
|
||||||
|
2. **Chained-call editorial receiver resolution.**
|
||||||
|
`PbsEditorialSupportService.resolveReceiverTypeBeforeDot` uses
|
||||||
|
`resolveChainSegmentsEndingAt`, which walks identifier/dot chains, not a call
|
||||||
|
expression ending in `)`. Thus the receiver of `down` in `pad.left().down()` is
|
||||||
|
unknown before destination mapping even begins. An explicitly typed intermediate
|
||||||
|
`button` restores raw lookup and hover, while the virtual-source policy still
|
||||||
|
prevents navigation. This is an editorial limitation, not evidence that executing
|
||||||
|
the same expression fails.
|
||||||
|
|
||||||
|
Recommended follow-up, not an accepted implementation decision: address chained
|
||||||
|
receiver resolution in the PBS editorial layer, and separately decide how to expose
|
||||||
|
the exact SDK sources as navigable read-only files. A version-scoped physical source
|
||||||
|
cache is compatible with the existing destination policy; virtual-document support
|
||||||
|
would require an explicit contract revision. Neither approach should duplicate SDK
|
||||||
|
semantics in MCP, permit SDK edits, or point to an unrelated developer checkout.
|
||||||
|
|
||||||
|
## Pitfalls and Takeaways
|
||||||
|
|
||||||
|
- A successful HTTP fixture is not an external-agent acceptance test. Prove both.
|
||||||
|
- Tab disposal is not task disposal; application teardown must own hidden sessions.
|
||||||
|
- Never unlock before process termination and document refresh acknowledge completion.
|
||||||
|
- Do not replay an advance because a connection or receipt was lost.
|
||||||
|
- A matching hash/blank canvas is weak visual evidence. Compare actual pixels,
|
||||||
|
metadata and an input timeline that changes a known object.
|
||||||
|
- An empty SDK definition is a language limitation, not permission to edit SDK code.
|
||||||
|
- Packaging language knowledge is part of making an unfamiliar language usable by
|
||||||
|
agents; adding another hidden language configuration is not.
|
||||||
|
- Keep provider permissions separate from Studio authority. Neither bypasses the other.
|
||||||
|
- Preserve explicit platform/client/test exclusions and deferred findings at closure.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Historical accepted decision DEC-0060 and completed plan PLN-0139, DSC-0068.
|
||||||
|
- [Studio architecture](../../../docs/specs/studio/9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md).
|
||||||
|
- [DEV and authority contract](../../../docs/specs/studio/10.%20DEV%20and%20Automation%20Specification.md).
|
||||||
|
- [MCP tools and knowledge contract](../../../docs/specs/studio/11.%20MCP%20Tools%20and%20Project%20Knowledge%20Contract.md).
|
||||||
|
- [Usage and troubleshooting](../../../README.md#external-coding-agents-mcp).
|
||||||
|
- Runtime-owned contract: `../runtime/docs/specs/runtime/11a-headless-automation-protocol.md`.
|
||||||
|
- Previous foundation: [Services must outlive UI](../DSC-0067-studio-core-javafx-decoupling/LSN-0075-studio-services-must-outlive-the-current-ui.md).
|
||||||
+178
@@ -0,0 +1,178 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0077
|
||||||
|
ticket: studio-persistent-mcp-connector
|
||||||
|
title: Integrated Studio MCP Through Stable Setup and Ephemeral Access
|
||||||
|
created: 2026-09-29
|
||||||
|
tags: [studio, mcp, connection, lifecycle, installation]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Integrated Studio MCP: Stable Setup, Ephemeral Access
|
||||||
|
|
||||||
|
Owner: **studio**, MCP integration, project lifecycle and local installation.
|
||||||
|
DSC-0070 / DEC-0061 / PLN-0140 delivered this integration, including the user's
|
||||||
|
accepted revision for automatic preparation on project open. These identifiers
|
||||||
|
are historical references; maintained contracts are linked below. Automated
|
||||||
|
validation and the user's confirmation of final manual acceptance are recorded
|
||||||
|
separately.
|
||||||
|
|
||||||
|
## Original Problem
|
||||||
|
|
||||||
|
The original integration exposed a new HTTP port and bearer token on each Studio
|
||||||
|
restart. Developers had to configure their coding client repeatedly. Ad hoc
|
||||||
|
transport scripts then duplicated initialization, authentication and result
|
||||||
|
handling, obscuring native MCP tools and images.
|
||||||
|
|
||||||
|
The durable solution separates three lifetimes: installation, connection and
|
||||||
|
project authority. A stable client registration must not imply durable permission
|
||||||
|
to edit, and a transport interruption must not replay work.
|
||||||
|
|
||||||
|
## Consolidated Design
|
||||||
|
|
||||||
|
The distributed Studio artifact supports two modes. Normal invocation opens the
|
||||||
|
desktop. `StudioLauncher mcp --project <absolute-root>` runs a stdio connector
|
||||||
|
without JavaFX, Spring desktop composition, LSP or a second HTTP server. The coding
|
||||||
|
client owns that process; developers do not launch it manually for each project.
|
||||||
|
|
||||||
|
The desktop starts one shared loopback HTTP server. Opening a project prepares its
|
||||||
|
enabled integration automatically through the same neutral port used by scaffold
|
||||||
|
and the explicit DEV retry. An explicitly disabled integration remains disabled.
|
||||||
|
Preparation failure is visible in DEV and does not make the project unusable.
|
||||||
|
Opening a project does not publish credentials or grant control.
|
||||||
|
|
||||||
|
The macOS installation has a stable `current` reference pointing to a validated,
|
||||||
|
versioned distribution containing dependency JARs and Java. The native client
|
||||||
|
invokes the absolute installed Java path with a classpath/main/project argument
|
||||||
|
array. Updating the installation changes the reference, not every project's client
|
||||||
|
entry. Old versions remain available for rollback and existing processes.
|
||||||
|
|
||||||
|
The tradeoff is an additional lightweight JVM for stdio transport, plus managed
|
||||||
|
installation lifecycle. In return, there are no per-project launchers or copied
|
||||||
|
connector binaries, and execution does not depend on an interactive shell PATH.
|
||||||
|
|
||||||
|
## Configuration and Authority Have Different Owners
|
||||||
|
|
||||||
|
| Surface | Lifetime and responsibility |
|
||||||
|
| --- | --- |
|
||||||
|
| `.studio/setup.json` | Neutral integration intent; preserves runtime/editor settings |
|
||||||
|
| `.codex/config.toml` | Local installed command, arguments and canonical project binding; no transient credentials |
|
||||||
|
| `.studio/mcp/connection.json` | Protected, temporary discovery data published by human grant |
|
||||||
|
| Core grant/task/operation records | In-memory authority and receipts; never restored from configuration |
|
||||||
|
|
||||||
|
Preparation edits only a managed client entry, validates the result with a TOML
|
||||||
|
parser and preserves unrelated settings/comments. User-owned, edited or tracked
|
||||||
|
entries cause explicit conflicts. Initial client trust or reload may still be
|
||||||
|
required; Studio does not change approval policy.
|
||||||
|
|
||||||
|
Human grant publishes a fresh credential scoped to one canonical project root.
|
||||||
|
HTTP sessions are bound to that credential, and the server enforces scope even
|
||||||
|
for knowledge reads. Restricting only the connector would leave a direct HTTP
|
||||||
|
bypass. Acquisition still creates a separate task identity through shared Core
|
||||||
|
services.
|
||||||
|
|
||||||
|
## Publication Is Part of the Grant Transaction
|
||||||
|
|
||||||
|
Publication cannot be a best-effort snapshot listener. The neutral lifecycle port
|
||||||
|
coordinates preparation, publication, activation, invalidation and cleanup:
|
||||||
|
|
||||||
|
1. Save and verify documents under the existing handoff rules.
|
||||||
|
2. Acquire the OS publication lock and write a private temporary descriptor outside
|
||||||
|
the authority monitor.
|
||||||
|
3. Atomically publish, then activate under the grant generation fence. Acquisition
|
||||||
|
remains unavailable until the transition completes.
|
||||||
|
4. Abort failed or superseded grants and remove their provisional access.
|
||||||
|
5. Revoke credentials before asynchronous work cleanup; remove only the owned
|
||||||
|
publication and release its lock.
|
||||||
|
|
||||||
|
The lock file's inode is retained. Deleting it could let another process lock a
|
||||||
|
new inode while the first owner still holds the old one. The OS releases the lock
|
||||||
|
after a crash, allowing safe replacement of stale discovery data. Directories are
|
||||||
|
0700 and secret-bearing files 0600; Git exclusion alone is not access control.
|
||||||
|
Cleanup checks publication ownership so an old callback cannot delete newer data.
|
||||||
|
File cleanup failure must not prevent runtime cancellation.
|
||||||
|
|
||||||
|
## Reconnect Without Replaying Intent
|
||||||
|
|
||||||
|
The stdio connector initializes and lists its packaged catalog before Studio or a
|
||||||
|
grant is available. It verifies live instance, root and catalog identity before
|
||||||
|
forwarding. Calls preserve structured results and native image blocks; response
|
||||||
|
limits are separate from the smaller request limit.
|
||||||
|
|
||||||
|
Discovery and ping may be retried. Build and frame advancement must not be
|
||||||
|
resubmitted automatically after a lost response. Within the same authorized task,
|
||||||
|
recover by operationId/clientRequestId lookup. After restart, old in-memory
|
||||||
|
receipts are unavailable: report an unknown outcome and require a fresh grant/task
|
||||||
|
and an explicit next intent. Connection liveness and working/manual authority are
|
||||||
|
separate DEV states.
|
||||||
|
|
||||||
|
## Implementation Findings
|
||||||
|
|
||||||
|
- JSON-RPC numeric IDs must be compared by numeric value. Jackson can represent
|
||||||
|
the same wire number with different integer node types.
|
||||||
|
- Grant publication is asynchronous. Tests must await the transition without
|
||||||
|
blocking the JavaFX thread or assuming a button callback completes filesystem IO.
|
||||||
|
- `jlink` can generate read-only license files. Normalize staged runtime write
|
||||||
|
permissions so subsequent Gradle installation updates can replace them.
|
||||||
|
- An IntelliJ desktop can run from classes without a managed installation. A
|
||||||
|
generic “preparation incomplete” message hid this prerequisite. The specific
|
||||||
|
diagnostic now points to `:prometeu-app:stageStudioInstallation` and the optional
|
||||||
|
`studio.installationRoot` VM setting.
|
||||||
|
- Preparation belongs to project opening, not only creation or a manual DEV
|
||||||
|
button. Otherwise existing projects retain unnecessary onboarding friction.
|
||||||
|
- Capture data larger than 1 MiB must not inherit the request-body cap. The
|
||||||
|
connector bounds response size and body-read time separately.
|
||||||
|
|
||||||
|
## Verified Results and Acceptance
|
||||||
|
|
||||||
|
The full implementation gate recorded 839 passing tests, 15 existing skips and no
|
||||||
|
failures, including installation, desktop and real runtime gates. The later
|
||||||
|
missing-installation diagnostic and automatic-open revision passed their targeted
|
||||||
|
preparation, Core, app, architecture and runtime suites. Installation staging,
|
||||||
|
`git diff --check` and `discussion validate` also passed.
|
||||||
|
|
||||||
|
Process tests cover cold initialization, later grant and restart in one connector;
|
||||||
|
large images; root/session scope; stale identity/catalog rejection; lost build
|
||||||
|
response with execution count remaining one; unknown old-task receipts; concurrent
|
||||||
|
publisher JVMs and crash recovery; protected files; grant/close races; TOML
|
||||||
|
preservation; and stable installed Java across updates.
|
||||||
|
|
||||||
|
On 2026-09-29, after being asked specifically about the outstanding manual gates,
|
||||||
|
the user confirmed that all were finished. This closes the native Codex
|
||||||
|
acquire/build/image/release and reconnect-after-restart cycle, installation update
|
||||||
|
and graphical-client launch, and IntelliJ debugger attachment. The provenance of
|
||||||
|
this final evidence is **user-reported acceptance**, not an additional automated
|
||||||
|
run or an independently observed transcript. The implementation's automated
|
||||||
|
environment was macOS ARM64 with bundled Corretto 21.0.4 and Codex CLI 0.158.0
|
||||||
|
installed; that version inspection alone was not treated as native-client proof.
|
||||||
|
|
||||||
|
The prior HTTP-only acceptance from DSC-0068 was not substituted for these gates.
|
||||||
|
The first accepted integration remains Codex on macOS; other clients/platforms
|
||||||
|
and the embedded terminal are outside this delivery.
|
||||||
|
|
||||||
|
## Operational Example
|
||||||
|
|
||||||
|
Open the project in Studio. Its enabled client integration is prepared without a
|
||||||
|
separate per-project Run. Start the coding client in that project and satisfy its
|
||||||
|
initial trust/reload requirements. Grant access in DEV, acquire the task through
|
||||||
|
native tools, edit/validate, then release. After Studio restarts, grant again;
|
||||||
|
keep the client configuration unchanged. An old task is never restored.
|
||||||
|
|
||||||
|
For an IntelliJ desktop, run `p.studio.app.StudioLauncher` with the
|
||||||
|
`prometeu-app` classpath and Java 21. If a managed installation is missing, stage
|
||||||
|
it once with `./gradlew :prometeu-app:stageStudioInstallation`. An isolated
|
||||||
|
installation uses the `studio.installationRoot` desktop VM property. The MCP
|
||||||
|
stdio process remains client-owned; attach Remote JVM Debug to that process using
|
||||||
|
an explicit development-only loopback JDWP option. Do not configure the desktop
|
||||||
|
Run itself with `mcp --project` arguments.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- DEC-0061 and PLN-0140: historical source decision and completed implementation
|
||||||
|
plan for DSC-0070; removed from active workflow during housekeeping.
|
||||||
|
- [Studio shell and project creation](../../../docs/specs/studio/1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md).
|
||||||
|
- [Project-local state and discovery](../../../docs/specs/studio/8.%20Project-Local%20Studio%20State%20Specification.md).
|
||||||
|
- [Core and adapter architecture](../../../docs/specs/studio/9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md).
|
||||||
|
- [DEV and authority](../../../docs/specs/studio/10.%20DEV%20and%20Automation%20Specification.md).
|
||||||
|
- [MCP contract and acceptance boundary](../../../docs/specs/studio/11.%20MCP%20Tools%20and%20Project%20Knowledge%20Contract.md).
|
||||||
|
- [Setup and IntelliJ debugging](../../../README.md).
|
||||||
|
- [DSC-0068 baseline lesson](../DSC-0068-studio-headless-runtime-ai-first/LSN-0076-ai-first-studio-through-shared-authority-and-headless-evidence.md).
|
||||||
|
- DSC-0071: the separate embedded-terminal discussion; unchanged by this work.
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0039
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Modelo de documentacao de simbolos em PBS e consumo markdown no hover
|
|
||||||
status: accepted
|
|
||||||
created: 2026-05-08
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Pain
|
|
||||||
|
|
||||||
A wave atual de assistencia editorial quer `hover` util, mas ainda nao existe um modelo claro para documentacao authored dentro de PBS.
|
|
||||||
|
|
||||||
Sem esse modelo, o hover pode até mostrar:
|
|
||||||
|
|
||||||
- kind;
|
|
||||||
- assinatura;
|
|
||||||
- origem;
|
|
||||||
- tipo/shape.
|
|
||||||
|
|
||||||
Mas continua sem uma superficie limpa para explicar intencao de uso, contrato semantico, detalhes de parametros ou observacoes de API.
|
|
||||||
|
|
||||||
Hoje a direcao consolidada eh algo como:
|
|
||||||
|
|
||||||
- `[Doc(markdown = """qualquer markdown aqui dentro...""")]`
|
|
||||||
|
|
||||||
como anotacao consumida diretamente pelo hover.
|
|
||||||
|
|
||||||
Isso parece simples no uso, mas toca em decisoes de linguagem e contrato editorial que merecem discussao propria.
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
Domain owner: `compiler/pbs`
|
|
||||||
|
|
||||||
Subdomains touched:
|
|
||||||
|
|
||||||
- `compiler/general`
|
|
||||||
- `studio/lsp`
|
|
||||||
- `tools/vscode-extension`
|
|
||||||
|
|
||||||
Esta agenda eh deliberadamente separada de `AGD-0038`.
|
|
||||||
|
|
||||||
Razao:
|
|
||||||
|
|
||||||
- `AGD-0038` trata da wave 1 de `completion`, `hover` e `signature help`;
|
|
||||||
- esta nova agenda trata da autoria, armazenamento, propagacao e consumo de documentacao de simbolos.
|
|
||||||
|
|
||||||
O objetivo eh evitar que a primeira wave de assistencia editorial fique bloqueada por uma decisao de linguagem ainda nao fechada.
|
|
||||||
|
|
||||||
## Open Questions
|
|
||||||
|
|
||||||
- A autoria da documentacao deve acontecer por anotacao explicita como `[Doc(...)]`, por comentario estruturado, ou por outro mecanismo?
|
|
||||||
- O payload authored deve aceitar um subset Markdown como fonte canonica, ou deve haver outra normalizacao/restricao?
|
|
||||||
- Quais declaracoes nomeadas de API podem carregar documentacao na wave inicial:
|
|
||||||
funcoes, methods, classes/structs, services, hosts, builtin/stdlib declarations e interface declarations?
|
|
||||||
- A documentacao deve viver no AST/semantics como superficie compiler-backed explicita?
|
|
||||||
- Como a documentacao authored em PBS se relaciona com documentacao de stdlib gerada ou importada de outras fontes?
|
|
||||||
- O hover deve consumir markdown pronto sem transformacao, ou deve haver um pipeline intermediario de sanitizacao/normalizacao?
|
|
||||||
- Como tratar multilinhas, escaping e ergonomia de escrita se a surface for `[Doc(...)]`?
|
|
||||||
- A agenda deve definir apenas o modelo de autoria, ou tambem o transporte LSP e a composicao final do hover?
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
### Option A - Anotacao `[Doc(...)]` com Markdown subset como payload canonico
|
|
||||||
|
|
||||||
- **Approach:** introduzir uma anotacao explicita na linguagem PBS cujo conteudo ja eh markdown pronto para o hover.
|
|
||||||
- **Pro:** autoria direta, intencao clara, pipeline simples de consumo no LSP e no hover.
|
|
||||||
- **Con:** precisa desenhar sintaxe, escaping, multiline e regras de onde a anotacao eh permitida.
|
|
||||||
- **Maintainability:** forte se a surface de linguagem ficar limpa.
|
|
||||||
|
|
||||||
### Option B - Comentarios estruturados como fonte de documentacao
|
|
||||||
|
|
||||||
- **Approach:** usar comentarios especiais ou doc-comments, com parser especifico para gerar documentacao de simbolo.
|
|
||||||
- **Pro:** mais familiar para quem vem de outras linguagens e menos intrusivo no corpo semantico da linguagem.
|
|
||||||
- **Con:** exige novo contrato de binding entre comentarios e simbolos, e pode aumentar ambiguidade editorial.
|
|
||||||
- **Maintainability:** media.
|
|
||||||
|
|
||||||
### Option C - Nao definir autoria em PBS agora e suportar apenas docs de stdlib por metadata externa
|
|
||||||
|
|
||||||
- **Approach:** deixar a linguagem sem surface authored por enquanto e alimentar hover apenas com docs externas/geradas.
|
|
||||||
- **Pro:** menor custo imediato de linguagem.
|
|
||||||
- **Con:** resolve mal a autoria de codigo de usuario e deixa o modelo incompleto.
|
|
||||||
- **Maintainability:** fraca.
|
|
||||||
|
|
||||||
## Tradeoffs
|
|
||||||
|
|
||||||
Option C nao parece suficiente como direcao de produto se a intencao eh ter hover realmente util para APIs authored em PBS.
|
|
||||||
|
|
||||||
Option B eh plausivel, mas move o problema para um binding entre comentario e simbolo que tambem precisa ser projetado com cuidado. Isso costuma parecer mais barato do que realmente eh.
|
|
||||||
|
|
||||||
Option A tem um custo claro de sintaxe e modelo, mas pelo menos deixa explicito que documentacao eh metadado semantico e nao apenas texto solto ao redor do codigo.
|
|
||||||
|
|
||||||
Se a equipe realmente quer markdown authored pronto para consumo no hover, Option A parece a discussao mais direta e honesta.
|
|
||||||
|
|
||||||
## Recommendation
|
|
||||||
|
|
||||||
Discutir esta agenda com viés inicial para **Option A** e fechar a decision com um shape canonico unico:
|
|
||||||
|
|
||||||
```pbs
|
|
||||||
[Doc(markdown = """
|
|
||||||
Draws a sprite.
|
|
||||||
|
|
||||||
- `x`: screen x
|
|
||||||
- `y`: screen y
|
|
||||||
""")]
|
|
||||||
```
|
|
||||||
|
|
||||||
O consenso da discussao eh que `Doc` eh curto e pratico, e que o nome do argumento `markdown` ja carrega a semantica do payload. Um prefixo lexical como `md"""..."""` nao deve entrar na v1 porque adiciona uma nova familia de literais antes de haver necessidade concreta para multiplos payloads especializados.
|
|
||||||
|
|
||||||
A recomendacao preliminar eh separar o problema em duas perguntas:
|
|
||||||
|
|
||||||
1. qual eh a surface canonical de autoria da documentacao em PBS?
|
|
||||||
2. como essa documentacao vira um payload editorial resolvido para hover e futuros consumers?
|
|
||||||
|
|
||||||
Mesmo que `[Doc(...)]` seja a direcao vencedora, a decision deve deixar claro:
|
|
||||||
|
|
||||||
- onde ela pode ser usada;
|
|
||||||
- qual formato textual aceita;
|
|
||||||
- como ela eh preservada no compiler;
|
|
||||||
- como chega ao LSP;
|
|
||||||
- e como o hover deve compor isso com assinatura e metadados do simbolo.
|
|
||||||
|
|
||||||
## Proposed Resolution
|
|
||||||
|
|
||||||
Fechar a agenda com a seguinte direcao:
|
|
||||||
|
|
||||||
- PBS deve suportar documentacao explicita de simbolos por atributo `[Doc(markdown = """...""")]`.
|
|
||||||
- `Doc` deve ter um unico shape canonico na v1: argumento nomeado `markdown` com payload em triple-quoted text block.
|
|
||||||
- O atributo segue a regra normal de atributos PBS: associa-se a declaracao imediatamente seguinte.
|
|
||||||
- `[Doc]` deve ser valido para declaracoes nomeadas de API que introduzem simbolo semantico nomeado e que possam carregar atributos, incluindo funcoes, methods, classes/structs, services, hosts, builtin/stdlib declarations e interface declarations.
|
|
||||||
- Parametros nao devem receber `[Doc]` na v1 em nenhuma situacao; a documentacao de parametros deve viver no Markdown da declaracao que os possui.
|
|
||||||
- A intencao normativa eh nao limitar artificialmente declaracoes documentaveis por origem; se algum ponto da gramatica de declaracao ainda nao aceita atributos, o plano deve tratar isso como trabalho sintatico explicito.
|
|
||||||
- A ordem entre `[Doc]` e outros atributos deve ser irrelevante.
|
|
||||||
- Mais de um `[Doc]` no mesmo simbolo deve ser erro semantico, nao erro de parse.
|
|
||||||
- `[Doc]` sem `markdown`, com argumentos extras, com payload vazio/whitespace-only, ou aplicado fora da superficie documentavel deve produzir diagnostico claro.
|
|
||||||
- O payload `"""..."""` deve ser tratado inicialmente como text block documental, nao como string runtime geral de PBS.
|
|
||||||
- O text block deve aplicar normalizacao de indentacao equivalente ao modelo de text blocks de Java/Javadoc: remover linhas externas vazias incidentais, calcular indentacao comum das linhas nao vazias, remover essa indentacao comum, preservar quebras internas e preservar o conteudo Markdown.
|
|
||||||
- O compiler deve preservar o Markdown normalizado como metadata semantica do simbolo.
|
|
||||||
- O LSP e demais consumers devem consumir documentacao resolvida pelo compiler; nao devem reparsear source para descobrir docs.
|
|
||||||
- Um subset Markdown deve ser o protocolo de documentacao authored em PBS.
|
|
||||||
- O Markdown deve ser definido como payload editorial preservado, nao como garantia de renderizacao identica em todos os clientes. Renderizacao, sanitizacao e suporte a constructs especificos sao responsabilidades do consumer.
|
|
||||||
- Formatters devem preservar o conteudo interno do text block e nao devem reflowar Markdown authored.
|
|
||||||
- Rename/refactor nao precisa atualizar referencias textuais dentro do Markdown nesta fase do projeto.
|
|
||||||
- Specs e documentacao da stdlib devem ser escritas em ingles.
|
|
||||||
- Testes devem validar o payload Markdown normalizado no compiler/LSP; validacao visual no VSCode pode ser manual.
|
|
||||||
- Stdlib, SDK e interface modules devem usar o mesmo modelo `[Doc(markdown = """...""")]` para documentacao authored.
|
|
||||||
- Se no futuro houver documentacao importada ou gerada, documentacao authored no source deve ter precedencia, e conflitos devem ter regra deterministica ou diagnostico explicito.
|
|
||||||
|
|
||||||
## Maintenance Friction Points
|
|
||||||
|
|
||||||
Pontos que a decision e o plano devem proteger para evitar que uma feature simples de editor vire divida de linguagem:
|
|
||||||
|
|
||||||
- "Todas as declaracoes nomeadas de API documentaveis" precisa ser especificado como "toda declaracao de API que introduz simbolo semantico nomeado", evitando ambiguidade sobre parametros, fields, enum cases, tuple fields, expressoes e variaveis locais.
|
|
||||||
- A gramatica de atributos pode precisar ser expandida para declaracoes que hoje ainda nao aceitam atributos; isso deve ser tratado como parte real do trabalho, nao como excecao informal.
|
|
||||||
- A v1 nao deve aceitar aliases como `text`, argumento posicional, `html`, `format`, `Document`, `Documentation`, ou `md"""..."""`.
|
|
||||||
- `"""..."""` nao deve virar literal runtime geral sem uma decision propria.
|
|
||||||
- A normalizacao do text block deve ser especificada no texto normativo, nao apenas referenciada informalmente como "igual Java".
|
|
||||||
- Parametros nao recebem `[Doc]` na v1; fields, enum cases e tuple fields so devem receber `[Doc]` se a decision os classificar explicitamente como declaracoes nomeadas de API documentaveis.
|
|
||||||
- O formatter futuro eh um ponto sensivel: ele pode alinhar a declaracao, mas nao pode alterar o Markdown authored dentro do text block.
|
|
||||||
- A composicao visual do hover pode ficar para plano/implementacao, mas a ownership deve ficar clara: compiler resolve documentacao; LSP transporta; editor renderiza.
|
|
||||||
|
|
||||||
## Discussion
|
|
||||||
|
|
||||||
Esta agenda nao deve ser reduzida a "mostrar markdown no hover".
|
|
||||||
|
|
||||||
O problema real eh definir ownership e boundary da documentacao:
|
|
||||||
|
|
||||||
- o author escreve onde?
|
|
||||||
- o compiler preserva como?
|
|
||||||
- o LSP transporta em qual shape?
|
|
||||||
- o hover monta o resultado com qual ordem e responsabilidade?
|
|
||||||
|
|
||||||
Tambem vale observar que a escolha aqui pode influenciar mais do que hover:
|
|
||||||
|
|
||||||
- completions futuras podem querer `detail` e `documentation`;
|
|
||||||
- signature help pode querer descricoes de parametros;
|
|
||||||
- docs de stdlib podem querer surface unificada com docs authored.
|
|
||||||
|
|
||||||
Por isso, mesmo sendo uma agenda separada, ela conversa diretamente com a futura qualidade do editor.
|
|
||||||
|
|
||||||
## Resolution
|
|
||||||
|
|
||||||
Consenso de agenda formado em favor de `[Doc(markdown = """...""")]` como anotacao explicita, compiler-owned, com payload em subset Markdown e text block documental normalizado.
|
|
||||||
|
|
||||||
## Next Step
|
|
||||||
|
|
||||||
Aceitar a agenda e fechar uma `decision` propria para o modelo de documentacao de simbolos em PBS.
|
|
||||||
@@ -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-0057
|
|
||||||
ticket: multi-frontend-provider-contract
|
|
||||||
title: Introduzir provider completo de frontend
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, studio, frontend, registry, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Introduzir provider completo de frontend
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `studio`.
|
|
||||||
|
|
||||||
Discutir como consolidar um contrato de `FrontendProvider` que agrupe especificacao, compilador e servicos editoriais opcionais sem transformar o Studio em uma plataforma de plugins.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O repositorio ja possui `prometeu-compiler/prometeu-frontend-registry/src/main/java/p/studio/compiler/FrontendRegistryService.java` e superficies relacionadas a `FrontendSpec`, `FrontendPhaseService` e `languageId`. Ainda ha sinais de registro ou uso direto do PBS em composition roots e chamadas comuns.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Inspecionar o registry atual e seus consumidores.
|
|
||||||
- Definir se `FrontendProvider` deve ser novo contrato ou evolucao de contrato existente.
|
|
||||||
- Planejar `PBSFrontendProvider` como unico provider inicial.
|
|
||||||
- Preservar selecao atual por `languageId`.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Descoberta dinamica de plugins.
|
|
||||||
- Reflection, classpath scanning ou carregamento externo de JARs.
|
|
||||||
- Implementar qualquer frontend real alem do PBS.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/prometeu-frontend-registry/src/main/java/p/studio/compiler/FrontendRegistryService.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/...`
|
|
||||||
- `prometeu-studio/src/main/java/p/studio/projects/ProjectLanguageCatalogService.java`
|
|
||||||
- `prometeu-app/src/main/java/p/studio/AppContainer.java`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: criar `FrontendProvider` explicito com `specification()`, `compiler()` e `languageService()` opcional.
|
|
||||||
|
|
||||||
Opcao B: evoluir o registry para devolver um objeto existente que ja represente provider, adicionando apenas os campos faltantes.
|
|
||||||
|
|
||||||
Recomendacao inicial: preferir a menor mudanca que faca o codigo comum resolver `provider = registry.require(languageId)` e pare de conhecer classes PBS fora do composition root.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Comecar por uma auditoria de chamadas atuais ao registry e de instanciacoes diretas do PBS. Introduzir o contrato sem remover APIs antigas no mesmo passo, migrar PBS para o contrato e so entao substituir consumidores comuns.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Teste do registry exigindo resolucao por `languageId`.
|
|
||||||
- Teste de registro unico do PBS como provider inicial.
|
|
||||||
- Teste de erro claro para `languageId` desconhecido.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- O codigo comum consulta o provider, nao instancia `PBSFrontendPhaseService`.
|
|
||||||
- PBS permanece funcional.
|
|
||||||
- Nenhum frontend real novo e criado.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Criar uma abstracao grande demais antes de mapear os consumidores reais.
|
|
||||||
- Misturar contrato de build com contrato editorial.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Nome final do contrato.
|
|
||||||
- Responsabilidades minimas do provider.
|
|
||||||
- Onde fica o composition root autorizado a registrar PBS.
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0058
|
|
||||||
ticket: multi-frontend-compiler-vs-language-services
|
|
||||||
title: Separar compilacao de servicos editoriais de frontend
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, studio, lsp, editor, frontend, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Separar compilacao de servicos editoriais
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `studio/lsp`.
|
|
||||||
|
|
||||||
Separar o contrato necessario para build do contrato necessario para IDE, permitindo frontends progressivos: compilacao, diagnostics/highlighting e experiencia editorial completa.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O PBS fornece compilacao e varias superficies editoriais. Historicamente o Studio e o LSP podem assumir que semantic tokens, diagnostics e navegação vêm do mesmo servico PBS.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Identificar interfaces atuais de compilacao e editor.
|
|
||||||
- Definir capabilities opcionais para servicos editoriais.
|
|
||||||
- Garantir que ausencia de completion, hover, definition ou semantic tokens nao invalide um frontend compilavel.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Implementar novas features editoriais.
|
|
||||||
- Redesenhar todo o LSP.
|
|
||||||
- Criar frontend real sem recursos editoriais.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-lsp/prometeu-lsp-api/...`
|
|
||||||
- `prometeu-lsp/...`
|
|
||||||
- `prometeu-studio/src/main/java/p/studio/...editor...`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/...`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: `FrontendProvider` entrega `FrontendCompiler` obrigatorio e `Optional<FrontendLanguageService>`.
|
|
||||||
|
|
||||||
Opcao B: dividir language service em interfaces menores, como diagnostics, completion, hover, definition e semantic tokens.
|
|
||||||
|
|
||||||
Recomendacao inicial: mapear primeiro os consumidores. Se o LSP ja resolve features separadamente, usar interfaces menores; caso contrario, um language service opcional com capabilities pode ser suficiente.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Caracterizar o comportamento PBS atual, definir fallback para recurso ausente e migrar chamadas editoriais para consulta de capability antes de invocar servico.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Frontend provider compilavel sem language service nao quebra build.
|
|
||||||
- LSP/Studio tratam feature ausente como resposta vazia ou unsupported documentado.
|
|
||||||
- PBS continua expondo as mesmas respostas editoriais.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Compilacao nao depende de APIs de IDE.
|
|
||||||
- Recursos editoriais ausentes sao opcionais.
|
|
||||||
- O contrato permite os niveis 1, 2 e 3 descritos no alinhamento.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Introduzir `Optional` em excesso sem uma politica consistente de fallback.
|
|
||||||
- Acoplar diagnostics de build e diagnostics editoriais sem separar latencia e escopo.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Granularidade final das interfaces editoriais.
|
|
||||||
- Comportamento padrao para capability ausente.
|
|
||||||
- Relacao entre diagnostics de compilacao e diagnostics de editor.
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0059
|
|
||||||
ticket: multi-frontend-remove-pbs-branches
|
|
||||||
title: Remover verificacoes explicitas de PBS do codigo comum
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, compiler-pbs, studio, frontend, coupling, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Remover verificacoes explicitas de PBS do codigo comum
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `studio` e `compiler/pbs`.
|
|
||||||
|
|
||||||
Definir uma auditoria e remocao incremental de branches, instanciacoes e chamadas estaticas PBS em codigo comum.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O documento de alinhamento aponta ocorrencias como `"pbs"`, `PBSDefinitions`, `PBSFrontendPhaseService`, `PBSFrontend`, `PbsParser`, `PbsSemantic` e `languageId`. A primeira busca no repo confirma ocorrencias espalhadas em docs, testes, frontend PBS, build pipeline e Studio.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Classificar ocorrencias como internas ao PBS, composition root, testes PBS ou referencias indevidas.
|
|
||||||
- Substituir referencias indevidas por provider, spec, capability ou servico registrado.
|
|
||||||
- Manter excecoes explicitas documentadas.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Remover constantes PBS internas do proprio frontend.
|
|
||||||
- Alterar templates explicitamente PBS.
|
|
||||||
- Renomear packages.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-app/src/main/java/p/studio/AppContainer.java`
|
|
||||||
- `prometeu-studio/src/main/java/p/studio/window/NewProjectWizard.java`
|
|
||||||
- `prometeu-studio/src/main/java/p/studio/projects/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/...`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/...`
|
|
||||||
- testes que importam `p.studio.compiler.pbs...`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: auditoria textual primeiro, seguida de PRs pequenos por area.
|
|
||||||
|
|
||||||
Opcao B: criar teste arquitetural antes e usar falhas para guiar remocao.
|
|
||||||
|
|
||||||
Recomendacao inicial: fazer auditoria textual e classificar em tabela curta antes de alterar; em seguida adicionar teste arquitetural para impedir regressao.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Usar `rg` para localizar termos, confirmar nomes reais, registrar classificacao no plano derivado e migrar apenas uma fronteira por vez.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Teste de dependencia impedindo imports PBS em packages comuns.
|
|
||||||
- Testes de build existentes do PBS.
|
|
||||||
- Testes de Studio/project wizard para garantir templates PBS ainda funcionam.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Codigo comum nao decide comportamento por `"pbs"`.
|
|
||||||
- Excecoes ficam restritas a composition root, testes PBS, templates PBS e frontend PBS.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Remover uma referencia valida do PBS por classificacao apressada.
|
|
||||||
- Quebrar setup de projeto existente ao mover extensoes e templates para provider.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Lista de excecoes permitidas.
|
|
||||||
- Criterio de ownership para cada pacote comum.
|
|
||||||
- Ordem de migracao por area.
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0060
|
|
||||||
ticket: multi-frontend-frontend-backend-contract
|
|
||||||
title: Estabilizar contrato entre frontend e backend comum
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, compiler-pbs, ir, backend, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Estabilizar o contrato entre frontend e backend
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `compiler/pbs`.
|
|
||||||
|
|
||||||
Definir o limite exato entre frontend e backend para garantir que o backend receba IR comum, e nao AST, tokens, simbolos ou objetos semanticos PBS.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
As specs citam `IRBackend` como handoff executavel em `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md` e `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`. Testes como `IRBackendExecutableContractTest` e `LowerToIRVMServiceTest` ja sugerem um contrato backend direto.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Auditar tipos publicos de `IRBackend` e modelos associados.
|
|
||||||
- Confirmar se a estrutura atual ja representa uma IR comum.
|
|
||||||
- Identificar qualquer dependencia em AST ou semantica PBS no backend.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Renomear `IRBackend` por preferencia estetica.
|
|
||||||
- Redesenhar o lowering para IRVM.
|
|
||||||
- Implementar serializacao.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/models/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/...`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/...`
|
|
||||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: manter `IRBackend` e documentar/adaptar o contrato como `Prometeu Frontend IR`.
|
|
||||||
|
|
||||||
Opcao B: criar um novo nome de dominio quando houver divergencia real entre modelo atual e fronteira desejada.
|
|
||||||
|
|
||||||
Recomendacao inicial: auditar antes de renomear; mudar nomes so quando o modelo atual impedir clareza operacional.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Listar campos e tipos transitivos da IR, classificar cada item como comum ou especifico de PBS, e planejar extracoes pequenas para qualquer vazamento.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Teste construindo IR comum diretamente sem parser PBS.
|
|
||||||
- Teste de backend sem imports de packages PBS.
|
|
||||||
- Teste negativo para tipos AST PBS no contrato publico da IR.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Backend e testavel com IR montada manualmente.
|
|
||||||
- Contrato contem modulos, funcoes, tipos, blocos, calls, exports, lifecycle, spans, diagnostics e capabilities em termos neutros.
|
|
||||||
- Contrato nao contem `PbsExpression`, `PbsStatement`, `PbsToken` ou equivalentes.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Confundir IR comum com modelo de lowering interno de PBS.
|
|
||||||
- Quebrar fixtures existentes por mudanca ampla demais.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Nome normativo do handoff.
|
|
||||||
- Lista de tipos permitidos no contrato.
|
|
||||||
- Limite entre spec geral e spec PBS.
|
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0061
|
|
||||||
ticket: multi-frontend-serializable-ir
|
|
||||||
title: Manter a IR comum serializavel por design
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, ir, backend, serialization, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Manter a IR serializavel por design
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`.
|
|
||||||
|
|
||||||
Avaliar se a IR comum pode atravessar futuramente uma fronteira de processo sem redesenho, evitando callbacks, estado global, ciclos e identity equality como parte do contrato.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O pipeline atual roda na JVM, mas frontends futuros podem ser externos. O alinhamento proibe escolher JSON, Protobuf, RPC ou processo externo agora; a discussao deve focar no formato dos dados.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Auditar records/classes da IR comum.
|
|
||||||
- Identificar referencias a servicos, objetos mutaveis, ciclos e IDs implicitos.
|
|
||||||
- Definir principios de modelagem: IDs explicitos, listas ordenadas, enums e valores primitivos.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Implementar codec.
|
|
||||||
- Serializar a saida do PBS dentro do mesmo processo.
|
|
||||||
- Escolher wire format.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/models/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/...`
|
|
||||||
- testes `IRBackendExecutableContractTest` e `LowerToIRVMServiceTest`
|
|
||||||
- docs de specs do compiler geral
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: documentar invariantes de serializabilidade e corrigir apenas vazamentos claros.
|
|
||||||
|
|
||||||
Opcao B: criar tipos de ID e spans onde hoje houver identidade textual ou referencias diretas instaveis.
|
|
||||||
|
|
||||||
Recomendacao inicial: comecar por auditoria e testes de reflexao leves antes de qualquer migracao estrutural.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Gerar uma lista de tipos publicos da IR, revisar construtores e campos, e propor correcoes incrementais para pontos que impediriam um codec futuro.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Teste de reflexao sobre campos publicos/record components da IR.
|
|
||||||
- Teste de determinismo de ordenacao.
|
|
||||||
- Teste de ausencia de referencias a AST, servicos ou callbacks.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- A IR pode ser descrita como grafo de dados aciclico ou com referencias por ID.
|
|
||||||
- Nenhuma escolha prematura de wire format e introduzida.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Overengineering de IDs onde o contrato ainda nao exige.
|
|
||||||
- Quebrar ergonomia de testes ao tornar todos os objetos verbosos.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Regras minimas de serializabilidade.
|
|
||||||
- Tipos de ID que devem existir agora.
|
|
||||||
- Itens explicitamente adiados para codec futuro.
|
|
||||||
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0062
|
|
||||||
ticket: multi-frontend-common-lifecycle
|
|
||||||
title: Extrair lifecycle comum das responsabilidades do frontend PBS
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, compiler-pbs, lifecycle, backend, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Extrair o lifecycle do frontend PBS
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `compiler/pbs`.
|
|
||||||
|
|
||||||
Separar declaracao de lifecycle feita por uma linguagem da montagem comum de init, frame, module initializers e entrypoint publicado.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
As lessons e specs antigas indicam que PBS ja trata lifecycle e wrapper/entrypoint. O alinhamento pede que `PBSFrontendPhaseService` deixe de conter regras universais da plataforma.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Localizar onde PBS sintetiza ou valida lifecycle.
|
|
||||||
- Definir contrato comum de `LifecycleDeclaration` ou equivalente.
|
|
||||||
- Planejar servico comum para validar, ordenar e montar entrypoint.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Alterar sintaxe PBS.
|
|
||||||
- Mudar comportamento observavel de projetos existentes.
|
|
||||||
- Refatorar todo o backend junto da extracao.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/...PBSFrontendPhaseService...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/irvm/LowerToIRVMService.java`
|
|
||||||
- `docs/specs/compiler/16. Runtime Execution and Initialization Specification.md`
|
|
||||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: frontend PBS emite declaracoes neutras de lifecycle e backend/common assembler monta o entrypoint.
|
|
||||||
|
|
||||||
Opcao B: manter montagem no PBS por enquanto, mas isolar regras comuns em um servico compartilhado chamado pelo PBS.
|
|
||||||
|
|
||||||
Recomendacao inicial: extrair primeiro o servico comum com testes de caracterizacao, depois migrar o PBS para produzir apenas declaracoes.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Identificar fixture positiva atual, proteger com teste, criar contrato comum minimo, mover validacoes universais e manter mensagens PBS onde forem sintaxe/semantica da linguagem.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Lifecycle valido PBS continua gerando mesmo PBX/IRVM.
|
|
||||||
- Lifecycle ausente ou frame invalido falha no nivel comum quando aplicavel.
|
|
||||||
- Teste de IR comum com lifecycle sem parser PBS.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- PBS traduz a forma da linguagem para declaracoes neutras.
|
|
||||||
- Servico comum valida e monta lifecycle da plataforma.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Mover validacoes PBS-especificas para camada comum por engano.
|
|
||||||
- Alterar ordem de inicializadores sem perceber.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Nome e ownership do servico comum.
|
|
||||||
- Forma canonica das declaracoes de lifecycle.
|
|
||||||
- Separacao entre erro de linguagem e erro de plataforma.
|
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0063
|
|
||||||
ticket: multi-frontend-validation-boundaries
|
|
||||||
title: Separar validacoes de linguagem e validacoes de plataforma
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, compiler-pbs, backend, validation, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Separar validacoes de linguagem e plataforma
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com impacto em `compiler/pbs`.
|
|
||||||
|
|
||||||
Definir onde cada validacao deve viver: PBS para sintaxe e semantica da linguagem; compiler core/backend para entrypoints, exports, hostcalls, capabilities, layouts, IR e bytecode.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O PBS concentra parsing, semantica, lowering e algumas validacoes que podem ser universais. O backend ja possui validadores para IRVM, bytecode e precondicoes de lowering.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Mapear diagnostics e validacoes atuais.
|
|
||||||
- Classificar cada uma como linguagem ou plataforma.
|
|
||||||
- Definir regra: colocar a validacao no nivel mais baixo que a compreende sem conhecer a linguagem.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Reescrever todas as mensagens diagnosticas.
|
|
||||||
- Mudar codigos de erro sem necessidade.
|
|
||||||
- Transferir validacoes antes de existir contrato comum suficiente.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/backend/...`
|
|
||||||
- `docs/specs/compiler/19. Verification and Safety Checks Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: criar matriz de ownership de validacoes antes de mover codigo.
|
|
||||||
|
|
||||||
Opcao B: mover validacoes junto com lifecycle/IR quando cada fronteira for tocada.
|
|
||||||
|
|
||||||
Recomendacao inicial: matriz primeiro; migracao so quando uma decisao posterior fechar lifecycle e IR.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Auditar testes de erro existentes, agrupar por origem, decidir ownership e adicionar testes de regressao para impedir que o backend importe PBS.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Testes PBS para erros de sintaxe/semantica continuam no frontend.
|
|
||||||
- Testes comuns para IR malformada, hostcall inexistente, export duplicado e lifecycle invalido.
|
|
||||||
- Teste arquitetural de ausencia de imports PBS em validadores comuns.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Validacoes da plataforma sao expressas sem conceitos PBS.
|
|
||||||
- Validacoes PBS continuam preservadas e especificas.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Perder qualidade de diagnostico ao mover validacao para camada comum.
|
|
||||||
- Duplicar validacoes em vez de estabelecer ownership.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Matriz de validacoes e ownership.
|
|
||||||
- Politica de diagnosticos quando o erro comum ainda precisa de source span de frontend.
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0064
|
|
||||||
ticket: multi-frontend-sdk-canonical-definition
|
|
||||||
title: Auditoria e centralizacao gradual da definicao canonica do SDK
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, sdk, stdlib, hostcalls, intrinsics, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Centralizar a definicao do SDK
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`, com referencias a `compiler/pbs` e `vm-arch`.
|
|
||||||
|
|
||||||
Auditar onde hostcalls, intrinsics, tipos fundamentais e APIs do console sao definidos hoje antes de propor uma fonte canonica do SDK.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
Existem specs em `docs/vm-arch/INTRINSICS.csv`, docs de stdlib em `docs/specs/compiler/18. Standard Library Surface Specification.md`, specs PBS de stdlib e host ABI, alem de possiveis registries em codigo e fixtures.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Mapear fontes atuais da verdade.
|
|
||||||
- Identificar definicoes geradas, duplicadas e manuais.
|
|
||||||
- Propor caminho gradual para um schema canonico.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Migracao grande do SDK.
|
|
||||||
- Gerar bindings para C#, Kotlin, TypeScript ou outras linguagens.
|
|
||||||
- Escolher formato definitivo antes da auditoria.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `docs/vm-arch/INTRINSICS.csv`
|
|
||||||
- `docs/specs/compiler/18. Standard Library Surface Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/6.1. Intrinsics and Builtin Types Specification.md`
|
|
||||||
- `prometeu-compiler/...` registries de hostcalls/intrinsics/stdlib
|
|
||||||
- runtime/PVM quando presente no workspace ou submodulos relacionados
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: agenda de auditoria pura, produzindo mapa de fontes e duplicacoes.
|
|
||||||
|
|
||||||
Opcao B: criar schema canonico minimo depois da auditoria, sem migrar todos os consumidores.
|
|
||||||
|
|
||||||
Recomendacao inicial: primeiro fechar auditoria; so uma decision posterior deve escolher formato e migracao.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Listar cada hostcall/intrinsic/tipo fundamental em suas fontes atuais, comparar assinatura, capability, versao e docs, e classificar divergencias.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Testes de paridade entre registry runtime/backend e specs existentes, se ja houver fonte estruturada.
|
|
||||||
- Testes de nao divergencia para IDs e assinaturas apos qualquer centralizacao.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Existe mapa claro de fonte real da verdade.
|
|
||||||
- Duplicacoes e divergencias ficam registradas.
|
|
||||||
- Nenhuma migracao ampla e iniciada sem nova decisao.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Tratar docs como fonte real quando o codigo ja diverge.
|
|
||||||
- Iniciar geracao antes de saber quem consome cada definicao.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Fonte canonica proposta.
|
|
||||||
- Campos obrigatorios do SDK.
|
|
||||||
- Sequencia de migracao segura.
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0065
|
|
||||||
ticket: multi-frontend-pvm-neutrality
|
|
||||||
title: Neutralidade da PVM e identificacao PBX independente de PBS
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [vm-arch, runtime, pvm, pbx, compiler, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Manter a PVM neutra
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `vm-arch`, com impacto em `compiler/general`.
|
|
||||||
|
|
||||||
Garantir que a PVM conheca apenas PBX/IRVM e conceitos runtime neutros, incluindo identificacao correta do formato como `PBX`/`PBX\0`, nao `PBS`.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O documento e focado no Studio, mas runtime neutrality e uma fronteira transversal. A PVM nao deve conhecer `PBS service`, `PBS struct`, `PBS optional` ou qualquer conceito de linguagem.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Auditar nomenclatura e imports runtime/PVM disponiveis no repo.
|
|
||||||
- Verificar magic/header de PBX quando o codigo estiver no workspace.
|
|
||||||
- Confirmar que linguagem e convertida antes da execucao.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Modificar a PVM se o acoplamento estiver apenas no Studio ou compiler.
|
|
||||||
- Alterar ISA sem necessidade.
|
|
||||||
- Adicionar suporte a qualquer linguagem nova.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `docs/vm-arch/ARCHITECTURE.md`
|
|
||||||
- `docs/vm-arch/ISA_CORE.md`
|
|
||||||
- `docs/specs/compiler/15. Bytecode and PBX Mapping Specification.md`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/bytecode/...`
|
|
||||||
- runtime/PVM em repositorio ou modulo relacionado, quando presente
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: auditoria documental e de codigo para nomes PBS indevidos em runtime/bytecode.
|
|
||||||
|
|
||||||
Opcao B: corrigir imediatamente apenas identificacao `PBS` vs `PBX` se houver bug confirmado e isolado.
|
|
||||||
|
|
||||||
Recomendacao inicial: auditar primeiro; corrigir somente caso a fronteira esteja claramente violada e a mudanca seja pequena.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Buscar termos PBS no runtime, bytecode e specs VM; classificar ocorrencias validas de docs historicas vs erros de contrato.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Teste de magic/header PBX.
|
|
||||||
- Teste arquitetural impedindo imports PBS no runtime/PVM.
|
|
||||||
- Teste de carregamento/verificacao de programa sem dependencia de linguagem.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- PVM nao depende de conceitos PBS.
|
|
||||||
- Formato executavel e tratado como PBX.
|
|
||||||
- Qualquer correcao runtime necessaria fica separada de refactors Studio/compiler.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Confundir nomenclatura documental antiga com acoplamento real.
|
|
||||||
- Expandir escopo para VM quando o problema pertence ao compiler.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Lista de conceitos permitidos na PVM.
|
|
||||||
- Politica de nomenclatura PBX/PBS.
|
|
||||||
- Onde ficam testes de neutralidade runtime.
|
|
||||||
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0066
|
|
||||||
ticket: multi-frontend-synthetic-test-frontend
|
|
||||||
title: Frontend sintetico de teste para provar neutralidade do pipeline
|
|
||||||
status: open
|
|
||||||
created: 2026-07-15
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [compiler, compiler-general, frontend, tests, backend, multi-frontend]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Criar um frontend sintetico de teste
|
|
||||||
|
|
||||||
## Objetivo
|
|
||||||
|
|
||||||
Domain owner: `compiler/general`.
|
|
||||||
|
|
||||||
Discutir um frontend exclusivo de testes que prove que o pipeline comum nao depende implicitamente do PBS.
|
|
||||||
|
|
||||||
## Contexto atual
|
|
||||||
|
|
||||||
O criterio arquitetural final exige que um frontend sintetico implemente contratos equivalentes a `FrontendProvider`, `FrontendSpec` e `FrontendCompiler`, produza IR comum minima e passe pelo backend ate PBX/verifier.
|
|
||||||
|
|
||||||
## Escopo
|
|
||||||
|
|
||||||
- Escolher entre frontend totalmente sintetico ou extensao ficticia.
|
|
||||||
- Definir fixture de IR minima com `frame` vazio.
|
|
||||||
- Garantir isolamento em testes.
|
|
||||||
|
|
||||||
## Fora de escopo
|
|
||||||
|
|
||||||
- Expor frontend sintetico no Studio.
|
|
||||||
- Criar segunda linguagem real.
|
|
||||||
- Criar parser completo ou grammar dummy complexa.
|
|
||||||
|
|
||||||
## Arquivos e componentes a inspecionar
|
|
||||||
|
|
||||||
- `prometeu-compiler/prometeu-frontend-registry/...`
|
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/...`
|
|
||||||
- testes do build pipeline e backend
|
|
||||||
- `prometeu-studio/src/main/java/p/studio/projects/...` apenas se a selecao por extensao for exercitada
|
|
||||||
|
|
||||||
## Alteracoes propostas
|
|
||||||
|
|
||||||
Opcao A: provider sintetico que ignora arquivos e retorna IR minima diretamente.
|
|
||||||
|
|
||||||
Opcao B: extensao `.dummy` reconhecida em fixture, com conteudo ignorado ou trivial.
|
|
||||||
|
|
||||||
Recomendacao inicial: preferir Opcao A para provar neutralidade do pipeline sem criar outra superficie de linguagem.
|
|
||||||
|
|
||||||
## Estrategia de implementacao
|
|
||||||
|
|
||||||
Esperar provider/IR/lifecycle estarem suficientemente definidos, entao adicionar fixture de teste que registra provider sintetico e executa pipeline comum sem PBS.
|
|
||||||
|
|
||||||
## Testes necessarios
|
|
||||||
|
|
||||||
- Provider registrado e resolvido por `languageId`.
|
|
||||||
- Extensao/source handling testado se a opcao B for escolhida.
|
|
||||||
- IR comum produzida, lifecycle montado, IRVM gerado, PBX emitido e verificado.
|
|
||||||
|
|
||||||
## Criterios de aceitacao
|
|
||||||
|
|
||||||
- Teste falha se pipeline comum instanciar PBS implicitamente.
|
|
||||||
- Synthetic frontend existe apenas em test fixtures.
|
|
||||||
- PBS nao e afetado.
|
|
||||||
|
|
||||||
## Riscos
|
|
||||||
|
|
||||||
- Fixture sintetica exercitar caminho feliz pequeno demais e nao proteger acoplamentos reais.
|
|
||||||
- Virar uma segunda linguagem informal.
|
|
||||||
|
|
||||||
## Decisoes que devem ser registradas
|
|
||||||
|
|
||||||
- Forma do frontend sintetico.
|
|
||||||
- Escopo minimo da IR fixture.
|
|
||||||
- Onde o provider de teste pode ser registrado.
|
|
||||||
|
|
||||||
@@ -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.
|
|
||||||
|
|
||||||
-137
@@ -1,137 +0,0 @@
|
|||||||
---
|
|
||||||
id: DEC-0039
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: PBS symbol documentation with Doc markdown text blocks
|
|
||||||
status: accepted
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_agenda: AGD-0039
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
PBS editor assistance needs hover content that can explain author intent, API contracts, parameter meaning, semantic constraints, and usage notes. Existing symbol surfaces can expose mechanical information such as kind, signature, origin, and type/shape, but PBS does not yet define a canonical authored documentation model.
|
|
||||||
|
|
||||||
This decision belongs to domain owner `compiler/pbs`.
|
|
||||||
|
|
||||||
Touched subdomains:
|
|
||||||
|
|
||||||
- `compiler/general`
|
|
||||||
- `studio/lsp`
|
|
||||||
- `tools/vscode-extension`
|
|
||||||
|
|
||||||
This decision resolves `AGD-0039`. It does not replace the existing wave-1 editor-assistance work; it defines the source-language and compiler-backed documentation model that hover, completion, signature help, stdlib documentation, and future editor consumers can reuse.
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
|
|
||||||
PBS MUST support explicit authored documentation for named API declarations through a reserved `[Doc]` attribute.
|
|
||||||
|
|
||||||
The only canonical v1 shape is:
|
|
||||||
|
|
||||||
```pbs
|
|
||||||
[Doc(markdown = """
|
|
||||||
Draws a sprite.
|
|
||||||
|
|
||||||
- `x`: screen x
|
|
||||||
- `y`: screen y
|
|
||||||
""")]
|
|
||||||
```
|
|
||||||
|
|
||||||
`Doc` MUST be a reserved compiler-recognized attribute name. It MUST NOT be treated as an ordinary user-defined attribute with language-specific reinterpretation.
|
|
||||||
|
|
||||||
`Doc` MUST use a single required argument named `markdown`. The `markdown` argument MUST use a triple-quoted documentation text block as its payload. The v1 surface MUST NOT accept aliases or alternate forms such as `text`, positional arguments, `html`, `format`, `Document`, `Documentation`, or `md"""..."""`.
|
|
||||||
|
|
||||||
`[Doc]` MUST attach to the declaration immediately following it, following the normal PBS attribute association rule. Attribute order MUST be semantically irrelevant; `[Doc]` before or after other attributes on the same declaration MUST produce the same documentation result.
|
|
||||||
|
|
||||||
`[Doc]` MUST be 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 in the PBS declaration surface;
|
|
||||||
- services;
|
|
||||||
- hosts;
|
|
||||||
- builtin and stdlib declarations;
|
|
||||||
- interface declarations.
|
|
||||||
|
|
||||||
Parameters MUST NOT receive `[Doc]` in v1 under any circumstance. Parameter documentation, when needed, 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 named API declarations documentable by `[Doc]`.
|
|
||||||
|
|
||||||
The `markdown` payload MUST be a PBS documentation text block, not a general runtime string literal. `"""..."""` MUST NOT become a general PBS runtime string literal as part of this decision.
|
|
||||||
|
|
||||||
The documentation text block MUST be normalized before semantic validation and before exposure to editor consumers. Normalization MUST:
|
|
||||||
|
|
||||||
- remove an incidental leading empty line after the opening delimiter;
|
|
||||||
- remove an incidental trailing empty line before the closing delimiter;
|
|
||||||
- compute the common indentation of non-empty content lines;
|
|
||||||
- remove that common indentation;
|
|
||||||
- preserve internal line breaks;
|
|
||||||
- preserve Markdown content after indentation normalization.
|
|
||||||
|
|
||||||
After normalization, an empty or whitespace-only documentation payload MUST be rejected.
|
|
||||||
|
|
||||||
The authored documentation format for PBS v1 MUST be a supported Markdown subset. PBS defines Markdown as the documentation protocol, not as a guarantee that every client renders every Markdown construct identically.
|
|
||||||
|
|
||||||
The compiler MUST preserve normalized Markdown documentation as semantic metadata of the documented symbol. LSP and editor consumers MUST consume compiler-resolved documentation metadata; they MUST NOT reparse PBS source to discover documentation.
|
|
||||||
|
|
||||||
`[Doc]` MUST be compile/editor metadata. It MUST NOT be lowered into runtime or cartridge artifacts unless a future runtime or packaging decision explicitly requires that.
|
|
||||||
|
|
||||||
Stdlib, SDK, and interface modules MUST use the same `[Doc(markdown = """...""")]` model for authored documentation. If imported or generated documentation exists in the future, authored source documentation MUST take precedence. Conflicts MUST be deterministic or produce explicit diagnostics.
|
|
||||||
|
|
||||||
## Rationale
|
|
||||||
|
|
||||||
An explicit attribute keeps documentation attached to language-owned semantic symbols instead of relying on proximity between comments and declarations. This avoids a separate comment-binding model and gives the compiler one canonical source of truth for editor assistance.
|
|
||||||
|
|
||||||
The short attribute name `Doc` is practical at the authoring site and remains clear when paired with the required `markdown` argument. The argument name carries the payload format, so a prefixed literal such as `md"""..."""` would add lexer and grammar surface without enough v1 benefit.
|
|
||||||
|
|
||||||
Restricting the v1 shape to `[Doc(markdown = """...""")]` protects maintainability. It avoids aliases, ambiguous forms, and compatibility pressure around multiple documentation payload formats.
|
|
||||||
|
|
||||||
Restricting triple-quoted text blocks to documentation avoids accidentally introducing general multiline runtime strings. Runtime strings raise separate questions about type behavior, lowering, constant pools, equality, escapes, and artifact representation; those questions do not belong to this documentation decision.
|
|
||||||
|
|
||||||
Compiler ownership keeps hover, completion, signature help, stdlib docs, and future editor consumers aligned. The LSP layer should transport resolved documentation, not infer language semantics from raw source text.
|
|
||||||
|
|
||||||
## Implications
|
|
||||||
|
|
||||||
- PBS syntax and parsing MUST recognize triple-quoted documentation text blocks in `[Doc(markdown = ...)]`.
|
|
||||||
- PBS semantic validation MUST enforce the canonical `Doc` shape, allowed declaration sites, duplicate detection, empty-payload rejection, and invalid-argument diagnostics.
|
|
||||||
- A declaration MUST NOT have more than one `[Doc]`; duplicates MUST be semantic errors rather than parse errors.
|
|
||||||
- Formatter implementations MUST preserve the internal Markdown text of documentation blocks and MUST NOT reflow authored Markdown.
|
|
||||||
- Rename/refactor tools are not required in this phase to update textual references inside Markdown documentation.
|
|
||||||
- Specs and stdlib documentation authored for repository-owned surfaces MUST be written in English.
|
|
||||||
- Tests SHOULD validate normalized Markdown payloads at compiler and LSP boundaries. VSCode visual validation may remain manual for this wave.
|
|
||||||
- Hover composition may be implemented later, but the ownership boundary is fixed: compiler resolves documentation, LSP transports it, and the editor renders it.
|
|
||||||
|
|
||||||
## Propagation Targets
|
|
||||||
|
|
||||||
- specs:
|
|
||||||
- `docs/specs/compiler-languages/pbs/3. Core Syntax Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/4. Static Semantics Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/11. AST Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
|
||||||
- LSP/editor-facing specs if/when a dedicated Studio/LSP spec surface exists.
|
|
||||||
- plans:
|
|
||||||
- Create an implementation plan for syntax, AST, semantics, documentation metadata, LSP exposure, tests, and stdlib authoring.
|
|
||||||
- code:
|
|
||||||
- PBS lexer/parser/AST.
|
|
||||||
- PBS semantic validation and symbol/editorial surfaces.
|
|
||||||
- LSP hover/editorial transport.
|
|
||||||
- Stdlib/interface PBS sources.
|
|
||||||
- tests:
|
|
||||||
- Lexer/parser coverage for documentation text blocks.
|
|
||||||
- Semantic diagnostics for invalid `Doc` usage.
|
|
||||||
- Normalization tests for indentation and empty payloads.
|
|
||||||
- Compiler/editorial surface tests proving documentation is attached to resolved symbols.
|
|
||||||
- LSP hover or symbol-documentation payload tests.
|
|
||||||
- docs:
|
|
||||||
- PBS language specs.
|
|
||||||
- Any lessons generated after implementation and housekeeping.
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
- Agenda: AGD-0039
|
|
||||||
- Source discussion: DSC-0036
|
|
||||||
|
|
||||||
## Revision Log
|
|
||||||
|
|
||||||
- 2026-07-15: Initial decision drafted from accepted `AGD-0039`.
|
|
||||||
-63
@@ -1,63 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0092
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Specify PBS Doc attribute and markdown text block syntax
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Update the PBS normative specs so `DEC-0039` is reflected before code changes begin. This plan is the specification gate for the `[Doc(markdown = """...""")]` feature.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Define the syntax, static semantics, AST shape, diagnostics, and stdlib documentation policy for compiler-owned PBS symbol documentation.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Requires accepted decision `DEC-0039`.
|
|
||||||
- Must be completed before parser, semantic, LSP, and stdlib implementation plans are accepted as complete.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add `[Doc(markdown = """...""")]` to the PBS attribute surface.
|
|
||||||
- Define triple-quoted documentation text blocks as documentation-only payloads, not runtime strings.
|
|
||||||
- Define documentable named API declarations and explicitly exclude parameters.
|
|
||||||
- Define normalization, duplicate handling, invalid shape diagnostics, and non-runtime lowering rules.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Implement lexer, parser, semantics, or LSP code.
|
|
||||||
- Define general multiline runtime strings.
|
|
||||||
- Define VSCode rendering details beyond the compiler/LSP ownership boundary.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Update `docs/specs/compiler-languages/pbs/3. Core Syntax Specification.md` with the canonical `[Doc(markdown = """...""")]` syntax, allowed declaration sites, attribute ordering rule, and text block delimiter rules.
|
|
||||||
2. Update `docs/specs/compiler-languages/pbs/4. Static Semantics Specification.md` with reserved `Doc` validation, duplicate rejection, parameter exclusion, empty normalized payload rejection, and non-documentable target diagnostics.
|
|
||||||
3. Update `docs/specs/compiler-languages/pbs/11. AST Specification.md` with an AST representation for documentation attributes and documentation text block payloads.
|
|
||||||
4. Update `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md` with required diagnostic categories for unterminated text block, invalid `Doc` shape, duplicate `Doc`, empty payload, and invalid target.
|
|
||||||
5. Update `docs/specs/compiler-languages/pbs/5. Manifest, Stdlib, and SDK Resolution Specification.md` with the rule that stdlib, SDK, and interface modules use the same authored `Doc` surface.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Specs define all normative rules from `DEC-0039` without deferring syntax or semantics to implementation judgment.
|
|
||||||
- The specs explicitly state that `"""..."""` is documentation-only for this feature.
|
|
||||||
- The specs explicitly state that parameters never receive `[Doc]` in v1.
|
|
||||||
- The specs identify propagation boundaries: compiler resolves, LSP transports, editor renders.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- Run any existing spec conformance tests that validate PBS spec references.
|
|
||||||
- No code behavior tests are required in this plan.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `docs/specs/compiler-languages/pbs/3. Core Syntax Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/4. Static Semantics Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/11. AST Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`
|
|
||||||
- `docs/specs/compiler-languages/pbs/5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0093
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Implement PBS lexer support for documentation text blocks
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Add lexical support for triple-quoted documentation text blocks required by `[Doc(markdown = """...""")]`.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Teach the PBS lexer to tokenize documentation text blocks without turning triple quotes into a general runtime string feature.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092` for the normative syntax.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add a dedicated token kind for documentation text block payloads or an equivalent lexer representation.
|
|
||||||
- Recognize `"""` open and close delimiters.
|
|
||||||
- Preserve source text and spans for parser and diagnostics.
|
|
||||||
- Report unterminated documentation text blocks with useful span information.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Parse or validate `[Doc]` attribute shapes.
|
|
||||||
- Normalize indentation.
|
|
||||||
- Lower documentation to runtime artifacts.
|
|
||||||
- Add general multiline string expressions.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Update `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lexer/PbsTokenKind.java` with a documentation text block token if a distinct token is the cleanest local pattern.
|
|
||||||
2. Update `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lexer/PbsLexer.java` to recognize `"""..."""` and preserve its raw lexeme and span.
|
|
||||||
3. Ensure ordinary string scanning remains unchanged for `"..."`.
|
|
||||||
4. Add or update lexer diagnostics in `LexErrors.java` only if existing unterminated-string diagnostics cannot accurately represent unterminated documentation text blocks.
|
|
||||||
5. Add focused tests in `PbsLexerTest` for valid text blocks, multiline payloads, embedded single quotes/double quotes, and unterminated blocks.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- The lexer can tokenize a multiline documentation text block.
|
|
||||||
- Unterminated documentation text blocks produce a deterministic diagnostic.
|
|
||||||
- Ordinary string literals keep current behavior.
|
|
||||||
- `"""..."""` is not accepted as an expression-level runtime string by this plan.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- `./gradlew :prometeu-compiler:frontends:prometeu-frontend-pbs:test` or the repository-equivalent targeted compiler frontend test task.
|
|
||||||
- Focused `PbsLexerTest` cases for documentation text blocks.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lexer/PbsLexer.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lexer/PbsTokenKind.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lexer/LexErrors.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs/lexer/PbsLexerTest.java`
|
|
||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0094
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Extend PBS attribute parser and AST for Doc markdown payloads
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Extend parsing and AST representation so `[Doc(markdown = """...""")]` can be represented structurally before semantic validation.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Parse documentation text block attribute values and expose them in AST without accepting alternate `Doc` shapes as valid semantics.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092`.
|
|
||||||
- Depends on `PLN-0093` for lexer support.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Extend attribute values to carry documentation text block payloads.
|
|
||||||
- Preserve raw payload and spans needed for normalization and diagnostics.
|
|
||||||
- Keep parser recovery consistent with existing attribute parsing.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Validate whether `Doc` is allowed on a declaration.
|
|
||||||
- Normalize the text block.
|
|
||||||
- Attach documentation to semantic symbols.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Update `PbsAst.AttributeValue` variants in `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/ast/PbsAst.java` to include a documentation text block value or equivalent typed payload.
|
|
||||||
2. Update `PbsAttributeParser` so attribute arguments can parse `markdown = """..."""`.
|
|
||||||
3. Keep existing string, int, and bool attribute argument parsing unchanged.
|
|
||||||
4. Ensure parser diagnostics remain syntax-level: malformed attribute structure is parse error; invalid `Doc` shape is left to semantic validation where possible.
|
|
||||||
5. Add parser tests proving `Doc` attributes parse on top-level and nested declaration forms that already support attributes.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- `[Doc(markdown = """...""")]` parses into a distinct AST value or unambiguous attribute value representation.
|
|
||||||
- Existing attributes such as `[Init]`, `[Frame]`, `[Host(...)]`, and `[InitAllowed]` continue to parse.
|
|
||||||
- Invalid generic attribute syntax still recovers at the same boundaries as before.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- Targeted parser tests under `prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs/parser`.
|
|
||||||
- Existing PBS parser test suite.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/ast/PbsAst.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/parser/PbsAttributeParser.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs/parser/PbsParserTest.java`
|
|
||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0095
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Implement documentation text block normalization
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Implement the normalization algorithm required before semantic validation and editor exposure.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Produce normalized Markdown text from a raw documentation text block using the rules locked by `DEC-0039`.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092`.
|
|
||||||
- Depends on `PLN-0094` for AST access to raw text block payloads.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Strip incidental leading and trailing empty lines.
|
|
||||||
- Compute and remove common indentation from non-empty lines.
|
|
||||||
- Preserve internal line breaks and Markdown content after normalization.
|
|
||||||
- Provide a single reusable normalization implementation for parser/semantics/editorial surfaces.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Render Markdown.
|
|
||||||
- Sanitize Markdown for a specific editor.
|
|
||||||
- Reflow authored text.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Add a small normalization helper in the PBS frontend package, colocated with parser or semantic support according to local patterns.
|
|
||||||
2. Feed the helper raw documentation text block content without delimiters.
|
|
||||||
3. Normalize line endings deterministically before indentation calculation if existing source handling requires it.
|
|
||||||
4. Validate empty/whitespace-only content after normalization.
|
|
||||||
5. Add unit tests for no indentation, common indentation, blank first/last lines, mixed blank internal lines, Markdown lists, code spans, and whitespace-only payloads.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Normalized output matches the spec for all required indentation cases.
|
|
||||||
- Whitespace-only content is detectable after normalization.
|
|
||||||
- The normalizer does not interpret Markdown and does not alter non-indentation content.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- New focused unit tests for the normalizer.
|
|
||||||
- Parser/semantic tests that consume normalized output through `[Doc]`.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- New or existing PBS frontend helper under `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs`
|
|
||||||
- Corresponding tests under `prometeu-compiler/frontends/prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs`
|
|
||||||
-64
@@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0096
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Validate Doc attribute semantics and diagnostics
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Enforce the semantic contract of `[Doc]` after syntax can represent it.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Reject invalid `Doc` usage and produce clear diagnostics for all invalid shapes and targets required by `DEC-0039`.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092`.
|
|
||||||
- Depends on `PLN-0094`.
|
|
||||||
- Depends on `PLN-0095`.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Reserve `Doc` as a compiler-recognized attribute.
|
|
||||||
- Accept only `Doc(markdown = """...""")`.
|
|
||||||
- Reject aliases, positional arguments, extra arguments, duplicate `Doc`, empty normalized payload, parameter targets, and non-documentable targets.
|
|
||||||
- Keep duplicates as semantic errors rather than parse errors.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Attach documentation to final symbol metadata.
|
|
||||||
- Expose documentation through LSP.
|
|
||||||
- Author stdlib documentation.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Locate existing declaration and reserved attribute validators, including `PbsDeclarationSemanticsValidator`, `PbsDeclarationRuleValidator`, and interface-module reserved attribute checks.
|
|
||||||
2. Add `Doc` validation in the semantic phase that already validates declaration attributes.
|
|
||||||
3. Define allowed declaration categories according to the spec: named API declarations that can carry attributes.
|
|
||||||
4. Add or extend `PbsSemanticsErrors` diagnostics for invalid `Doc` target, invalid shape, duplicate attribute, missing `markdown`, extra arguments, and empty payload.
|
|
||||||
5. Add tests covering valid declaration targets and every invalid case.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Every invalid shape named by `DEC-0039` produces a semantic diagnostic.
|
|
||||||
- Parameters never accept `[Doc]`.
|
|
||||||
- Duplicate `[Doc]` on one declaration is rejected semantically.
|
|
||||||
- Existing reserved attributes keep their current behavior.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- `PbsSemanticsDeclarationsTest`
|
|
||||||
- `PbsInterfaceModuleSemanticsTest`
|
|
||||||
- `PbsDiagnosticsContractTest`
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics/PbsDeclarationSemanticsValidator.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics/PbsDeclarationRuleValidator.java`
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics/PbsSemanticsErrors.java`
|
|
||||||
- PBS semantics tests
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0097
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Attach Doc metadata to PBS semantic symbols
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Once `[Doc]` is syntactically and semantically valid, attach normalized documentation to compiler-owned semantic symbol data.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Make documentation available from resolved PBS symbols without requiring LSP or editor code to reparse source.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0095`.
|
|
||||||
- Depends on `PLN-0096`.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Introduce an internal documentation metadata model with format and text.
|
|
||||||
- Attach normalized Markdown to documented named API symbols.
|
|
||||||
- Preserve the distinction between documentation metadata and runtime semantics.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Render hover markdown.
|
|
||||||
- Write stdlib documentation content.
|
|
||||||
- Lower documentation into runtime artifacts.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Add a compiler-side documentation metadata model, for example `format = markdown` plus normalized `text`.
|
|
||||||
2. Extend symbol or editorial-resolution structures so documented declarations expose this metadata.
|
|
||||||
3. Update symbol collection/binding paths for functions, methods, structs/classes, services, hosts, builtin/stdlib declarations, and interface declarations.
|
|
||||||
4. Ensure imported/stdlib declarations can carry the same metadata once parsed.
|
|
||||||
5. Add compiler tests proving documentation is attached to the intended declaration and not to parameters or unrelated symbols.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Resolved symbols can expose documentation as structured metadata, not an untyped hover-only string.
|
|
||||||
- Documentation metadata is absent for undocumented symbols.
|
|
||||||
- Documentation does not change type checking, name resolution, or runtime behavior.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- Focused PBS semantic/editorial support tests.
|
|
||||||
- Existing name resolution and declaration tests to catch regressions.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics`
|
|
||||||
- `PbsEditorialResolvedSymbol`
|
|
||||||
- `PbsEditorialSupportService`
|
|
||||||
- Symbol/declaration binding code touched by documented declaration categories
|
|
||||||
-60
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0098
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Expose Doc metadata through PBS editorial and LSP surfaces
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Transport compiler-resolved documentation through the existing PBS editorial and LSP message boundaries.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Expose normalized Markdown documentation to LSP consumers without source reparsing.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0097`.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Extend compiler editorial result models to include documentation metadata.
|
|
||||||
- Extend LSP baseline messages where required.
|
|
||||||
- Keep documentation as Markdown-oriented structured data at the boundary.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Final hover layout composition.
|
|
||||||
- VSCode automated rendering tests.
|
|
||||||
- Runtime artifact changes.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Extend PBS editorial models such as `PbsEditorialResolvedSymbol`, completion candidates, or hover source models with optional documentation metadata.
|
|
||||||
2. Extend LSP API records under `prometeu-lsp/prometeu-lsp-api/src/main/java/p/studio/lsp/messages` only where the baseline protocol needs to carry documentation.
|
|
||||||
3. Update bridge code under `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler` to map compiler documentation to LSP baseline messages.
|
|
||||||
4. Preserve backward-compatible behavior for symbols without documentation.
|
|
||||||
5. Add tests proving the LSP service receives compiler-resolved documentation.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- LSP-facing code consumes compiler-resolved documentation metadata.
|
|
||||||
- No LSP code reparses PBS source to discover `[Doc]`.
|
|
||||||
- Existing completion, hover, and signature help behavior remains stable for undocumented code.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- PBS editorial support tests.
|
|
||||||
- LSP bridge tests.
|
|
||||||
- Existing `prometeu-lsp` protocol mapping tests.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/semantics/PbsEditorialResolvedSymbol.java`
|
|
||||||
- `prometeu-lsp/prometeu-lsp-api/src/main/java/p/studio/lsp/messages`
|
|
||||||
- `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler`
|
|
||||||
- Related LSP tests
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0099
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Render Doc markdown in hover composition
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Use transported documentation metadata in hover output while preserving the compiler/LSP/editor ownership boundary.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Compose hover Markdown from signature/kind metadata and normalized `[Doc]` documentation.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0098`.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add documentation content to PBS hover composition.
|
|
||||||
- Keep Markdown rendering responsibility in the editor/client.
|
|
||||||
- Preserve hover behavior for undocumented symbols.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Automate VSCode visual tests.
|
|
||||||
- Define a full documentation website generator.
|
|
||||||
- Change signature help parameter documentation behavior.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Locate the PBS hover composition path in `PbsEditorialSupportService` and LSP bridge/mapping code.
|
|
||||||
2. Compose hover Markdown in deterministic order: signature/kind surface, documentation Markdown, then origin/type/shape metadata as currently appropriate.
|
|
||||||
3. Avoid escaping or reflowing normalized Markdown beyond safe composition separators.
|
|
||||||
4. Ensure undocumented symbols keep existing hover output.
|
|
||||||
5. Add hover tests with paragraphs, lists, and code spans from `[Doc]`.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Hover includes normalized authored Markdown for documented symbols.
|
|
||||||
- Hover does not include empty documentation sections.
|
|
||||||
- Markdown lists do not become accidental code blocks due to indentation.
|
|
||||||
- VSCode validation remains manual for this wave.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- PBS editorial hover tests.
|
|
||||||
- LSP hover mapping tests that assert `MarkupKind.MARKDOWN` payloads.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `PbsEditorialSupportService`
|
|
||||||
- `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler`
|
|
||||||
- `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/protocol/mapping`
|
|
||||||
- Hover-related tests
|
|
||||||
-60
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0100
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Author Doc metadata for stdlib SDK and interface declarations
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Apply the new documentation model to repository-owned PBS stdlib, SDK, and interface declarations.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Author English `[Doc(markdown = """...""")]` documentation for stdlib/API surfaces so editor assistance has useful content.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092`.
|
|
||||||
- Should run after `PLN-0096` so authored docs are validated by compiler tests.
|
|
||||||
- Benefits from `PLN-0099` for hover verification but does not require it to author source docs.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add English Markdown documentation to stdlib, SDK, and interface declarations.
|
|
||||||
- Document parameters inside the owning declaration Markdown.
|
|
||||||
- Keep documentation concise and API-focused.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Add `[Doc]` to parameters.
|
|
||||||
- Generate external documentation sites.
|
|
||||||
- Change stdlib semantics or host binding behavior.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Inventory stdlib and SDK PBS files under `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/resources/game/stdlib`.
|
|
||||||
2. Add `[Doc(markdown = """...""")]` to public named API declarations that users see in completion/hover.
|
|
||||||
3. Document parameter meaning inside callable Markdown when needed.
|
|
||||||
4. Ensure host/interface declarations use the same `Doc` shape.
|
|
||||||
5. Run stdlib compile and interface conformance tests.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Public stdlib/SDK declarations that are user-facing have concise English documentation.
|
|
||||||
- No parameters receive `[Doc]`.
|
|
||||||
- Existing stdlib behavior and host ABI bindings are unchanged.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- `PbsGateUStdlibCompileTest`
|
|
||||||
- `PbsGateUSdkInterfaceConformanceTest`
|
|
||||||
- Relevant PBS frontend tests.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/resources/game/stdlib/1/**`
|
|
||||||
- Stdlib/interface compile tests
|
|
||||||
-58
@@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0101
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Protect runtime artifacts from Doc metadata lowering
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Guard the decision that `[Doc]` is compile/editor metadata and must not be lowered into runtime artifacts by default.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Ensure documentation metadata does not affect IR, bytecode, cartridge output, stack behavior, or runtime validation.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0097`.
|
|
||||||
- Should be validated before end-to-end conformance closure.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Confirm lowering ignores `Doc` metadata.
|
|
||||||
- Add regression tests comparing runtime-facing output with and without docs where practical.
|
|
||||||
- Protect constant pool and cartridge artifacts from documentation payload bloat.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Define a future packaging format for documentation.
|
|
||||||
- Remove compiler/editor metadata before LSP consumption.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Inspect PBS lowering paths under `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/lowering`.
|
|
||||||
2. Ensure documented declarations lower identically to undocumented declarations for runtime-facing IR/backend artifacts.
|
|
||||||
3. Add golden or structural tests comparing compiled output for equivalent documented and undocumented programs.
|
|
||||||
4. Ensure large documentation payloads do not appear in runtime constant pools unless a future decision explicitly changes that.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- Runtime-facing artifacts are unchanged by adding `[Doc]`.
|
|
||||||
- Compiler/editor metadata remains available before lowering for LSP/editor consumers.
|
|
||||||
- Golden artifact tests or equivalent regression tests cover this boundary.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- `PbsGoldenArtifactsTest`
|
|
||||||
- Backend/lowering tests relevant to PBS IR output.
|
|
||||||
- Any artifact comparison test already used by the compiler frontend.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- PBS lowering package
|
|
||||||
- Golden artifact test resources if needed
|
|
||||||
- Compiler backend artifact tests
|
|
||||||
-73
@@ -1,73 +0,0 @@
|
|||||||
---
|
|
||||||
id: PLN-0102
|
|
||||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
|
||||||
title: Add end-to-end Doc documentation conformance coverage
|
|
||||||
status: done
|
|
||||||
created: 2026-07-15
|
|
||||||
ref_decisions: [DEC-0039]
|
|
||||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Briefing
|
|
||||||
|
|
||||||
Close the feature with end-to-end tests that prove the whole `[Doc]` contract works across compiler and LSP boundaries.
|
|
||||||
|
|
||||||
## Objective
|
|
||||||
|
|
||||||
Validate that syntax, normalization, semantics, metadata attachment, LSP exposure, hover composition, stdlib docs, and runtime exclusion all satisfy `DEC-0039`.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Depends on `PLN-0092` through `PLN-0101`.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add integrated compiler tests for valid and invalid `[Doc]`.
|
|
||||||
- Add LSP tests for hover documentation payloads.
|
|
||||||
- Add conformance coverage for normalization and runtime exclusion.
|
|
||||||
- Define a manual VSCode checklist for final visual validation.
|
|
||||||
|
|
||||||
## Non-Goals
|
|
||||||
|
|
||||||
- Automate VSCode UI rendering.
|
|
||||||
- Add new documentation syntax beyond `[Doc(markdown = """...""")]`.
|
|
||||||
- Reopen decision scope.
|
|
||||||
|
|
||||||
## Execution Method
|
|
||||||
|
|
||||||
1. Create one or more fixture PBS files using `[Doc]` on functions, methods, structs/classes when available, services, hosts, and interface declarations.
|
|
||||||
2. Add negative fixtures for parameters, duplicate `Doc`, empty payload, missing `markdown`, extra arguments, alias names, and invalid targets.
|
|
||||||
3. Add LSP tests proving hover transports Markdown and does not reparse source.
|
|
||||||
4. Add runtime artifact tests proving docs do not lower.
|
|
||||||
5. Record a short manual VSCode validation checklist covering paragraph rendering, list rendering, code spans, indentation behavior, and undocumented-symbol fallback.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- All decision rules have at least one compiler or LSP test.
|
|
||||||
- Manual VSCode validation scope is documented but not automated.
|
|
||||||
- The feature can be implemented without returning to the agenda or decision for missing requirements.
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
- Full relevant PBS frontend test suite.
|
|
||||||
- Relevant LSP module tests.
|
|
||||||
- Runtime/lowering golden tests.
|
|
||||||
- Manual VSCode checklist execution before final housekeeping.
|
|
||||||
|
|
||||||
## Manual VSCode Validation Checklist
|
|
||||||
|
|
||||||
This plan intentionally does not automate VSCode UI rendering. Before final housekeeping, validate manually that:
|
|
||||||
|
|
||||||
- hover renders a `Doc` paragraph below the symbol signature and kind;
|
|
||||||
- Markdown lists render from `- item` documentation lines;
|
|
||||||
- code spans such as `` `color` `` render as inline code;
|
|
||||||
- normalized indentation from `[Doc(markdown = """...""")]` does not leak leading source indentation into hover;
|
|
||||||
- undocumented symbols still show the existing hover fallback without an empty documentation block;
|
|
||||||
- completion documentation matches the same Markdown payload used by hover.
|
|
||||||
|
|
||||||
## Affected Artifacts
|
|
||||||
|
|
||||||
- PBS frontend tests and fixtures
|
|
||||||
- LSP tests and fixtures
|
|
||||||
- Golden/runtime artifact tests
|
|
||||||
- Optional manual validation note in the implementation PR or plan completion record
|
|
||||||
@@ -82,7 +82,8 @@ 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.
|
- 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.
|
- 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.
|
- Qualitative cost facts such as retention-bearing operations and host-boundary crossings are normative, but quantitative performance metrics are not.
|
||||||
- Topic `19` requires deterministic diagnostics for globals, lifecycle markers, init admission, and published-wrapper structural failures.
|
- 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`.
|
||||||
|
|
||||||
## 6. Required Diagnostic Phases
|
## 6. Required Diagnostic Phases
|
||||||
|
|
||||||
@@ -97,6 +98,8 @@ 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.
|
`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.
|
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
|
## 7. Required Diagnostic Identity, Payload, and Attribution
|
||||||
@@ -180,7 +183,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`,
|
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.
|
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.
|
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 and globals diagnostics required by topic `19`, including:
|
8. lifecycle-marker and source-form global diagnostics, including:
|
||||||
- `global initializer uses unsupported form`,
|
- `global initializer uses unsupported form`,
|
||||||
- `global dependency cycle detected`,
|
- `global dependency cycle detected`,
|
||||||
- `global import must resolve through a global barrel entry`,
|
- `global import must resolve through a global barrel entry`,
|
||||||
@@ -194,16 +197,13 @@ At minimum, the PBS diagnostics baseline must cover:
|
|||||||
- `project init must be colocated with frame`,
|
- `project init must be colocated with frame`,
|
||||||
- `Init attribute target invalid`,
|
- `Init attribute target invalid`,
|
||||||
- `InitAllowed is valid only on SDK host methods`,
|
- `InitAllowed is valid only on SDK host methods`,
|
||||||
- `host call not allowed during init`,
|
- `host call not allowed during init`.
|
||||||
- `synthetic wrapper entrypoint missing`,
|
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`.
|
||||||
- `published entrypoint is not function index 0`,
|
10. symbolic asset-reference diagnostics required by backend-owned `Addressable` resolution, including:
|
||||||
- `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,
|
- unresolved terminal asset reference,
|
||||||
- namespace-versus-terminal asset misuse,
|
- namespace-versus-terminal asset misuse,
|
||||||
- structurally invalid symbolic asset path admitted by source syntax but rejected by semantic surface rules.
|
- structurally invalid symbolic asset path admitted by source syntax but rejected by semantic surface rules.
|
||||||
10. ignored-value diagnostics for expression statements, including:
|
11. ignored-value diagnostics for expression statements, including:
|
||||||
- a stable warning when a materialized value is produced and then ignored,
|
- a stable warning when a materialized value is produced and then ignored,
|
||||||
- and no warning for unit-like expression statements.
|
- and no warning for unit-like expression statements.
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# PBS Lowering IRBackend Specification
|
# PBS Lowering IRBackend Specification
|
||||||
|
|
||||||
Status: Draft v1 (Frontend Scope + Backend Handoff Addendum)
|
Status: Draft v1 (PBS Frontend Scope + Common Handoff Emission)
|
||||||
Applies to: first lowering boundary from bound PBS frontend model into `IRBackend`/`IRBackendFile`, plus executable-backend handoff obligations at this boundary
|
Applies to: first lowering boundary from bound PBS frontend model into the common `IRBackend`/`IRBackendFile` handoff
|
||||||
|
|
||||||
## 1. Purpose
|
## 1. Purpose
|
||||||
|
|
||||||
This document defines the normative frontend lowering contract from PBS source semantics to `IRBackend`.
|
This document defines the normative frontend lowering contract from PBS source semantics to the common `IRBackend` handoff.
|
||||||
|
|
||||||
Its purpose is to keep the first lowering deterministic and shared across implementations while PBS and backend design evolve.
|
Its purpose is to keep PBS lowering deterministic while preserving the common frontend-to-backend contract owned by compiler-general backend specs.
|
||||||
|
|
||||||
## 2. Scope
|
## 2. Scope
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ This document defines:
|
|||||||
- semantic obligations preserved in `IRBackend`,
|
- semantic obligations preserved in `IRBackend`,
|
||||||
- deterministic rejection behavior for unsupported frontend-lowering forms,
|
- deterministic rejection behavior for unsupported frontend-lowering forms,
|
||||||
- diagnostics attribution obligations for lowering failures in frontend scope,
|
- diagnostics attribution obligations for lowering failures in frontend scope,
|
||||||
- executable-backend handoff obligations at the `IRBackend` boundary,
|
- PBS obligations for emitting the common executable `IRBackend` handoff,
|
||||||
- and backend-owned symbolic lowering obligations for asset-facing references.
|
- and backend-owned symbolic lowering obligations for asset-facing references.
|
||||||
|
|
||||||
This document does not define:
|
This document does not define:
|
||||||
@@ -26,7 +26,8 @@ This document does not define:
|
|||||||
- VM lowering (`IRVM`),
|
- VM lowering (`IRVM`),
|
||||||
- bytecode/PBX mapping,
|
- bytecode/PBX mapping,
|
||||||
- runtime execution behavior,
|
- runtime execution behavior,
|
||||||
- verifier/loader internals.
|
- verifier/loader internals,
|
||||||
|
- or common backend ownership of the `IRBackend -> IRVM` contract.
|
||||||
|
|
||||||
Those concerns belong to shared acceptance specs under `docs/specs/compiler`.
|
Those concerns belong to shared acceptance specs under `docs/specs/compiler`.
|
||||||
|
|
||||||
@@ -75,9 +76,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;
|
- 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.
|
- and lowering must preserve enough identity for the backend to complete final operational resolution.
|
||||||
|
|
||||||
## 6. IRBackend Preserved Obligations
|
## 6. PBS IRBackend Emission Obligations
|
||||||
|
|
||||||
For each admitted source unit and callable in the current lowering slice, `IRBackend` must preserve at minimum:
|
For each admitted PBS source unit and callable in the current lowering slice, PBS lowering must emit `IRBackend` that preserves at minimum:
|
||||||
|
|
||||||
1. callable identity (name/category as applicable),
|
1. callable identity (name/category as applicable),
|
||||||
2. callable arity,
|
2. callable arity,
|
||||||
@@ -85,14 +86,18 @@ For each admitted source unit and callable in the current lowering slice, `IRBac
|
|||||||
4. source attribution anchor (`file + span`) for diagnostics and traceability,
|
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).
|
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.
|
6. deterministic `requiredCapabilities` derived from admitted host-binding metadata for packer/runtime-manifest assistance.
|
||||||
7. compiler-selected published-wrapper entrypoint identity for backend handoff,
|
7. a typed `IRLifecycleDeclaration` for executable programs, with file-init fragment, optional project-init, and required frame-root references,
|
||||||
8. explicit global and synthetic lifecycle structure required by executable lowering.
|
8. explicit user globals and frontend-lowered file-init fragments required by later common lifecycle assembly,
|
||||||
9. backend-owned symbolic identities that must survive to later executable lowering, including symbolic asset references when admitted by the source slice.
|
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.
|
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.
|
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
|
## 7. Deterministic Rejection Policy
|
||||||
|
|
||||||
If a source form is outside current frontend-lowering support:
|
If a source form is outside current frontend-lowering support:
|
||||||
@@ -111,7 +116,7 @@ For multi-module builds, lowering admission must apply dependency-scoped fail-fa
|
|||||||
|
|
||||||
## 8. Conformance Boundary
|
## 8. Conformance Boundary
|
||||||
|
|
||||||
`IRBackend` is the first lowering boundary (frontend responsibility).
|
PBS emission into `IRBackend` is the first PBS lowering boundary (frontend responsibility).
|
||||||
|
|
||||||
Conformance-valid claims at this boundary require Gate U evidence from `docs/specs/compiler/13. Conformance Test Specification.md`.
|
Conformance-valid claims at this boundary require Gate U evidence from `docs/specs/compiler/13. Conformance Test Specification.md`.
|
||||||
|
|
||||||
@@ -148,9 +153,9 @@ This document is healthy when:
|
|||||||
3. deterministic rejection policy is explicit and test-backed,
|
3. deterministic rejection policy is explicit and test-backed,
|
||||||
4. and scope boundaries with general/backend acceptance specs are explicit.
|
4. and scope boundaries with general/backend acceptance specs are explicit.
|
||||||
|
|
||||||
## 12. Executable Backend Handoff Addendum (v1)
|
## 12. PBS Executable Handoff Emission Obligations (v1)
|
||||||
|
|
||||||
For executable backends, the `IRBackend` output from this frontend boundary must satisfy the additional handoff obligations below.
|
For executable backends, PBS lowering must emit `IRBackend` satisfying the additional handoff obligations below before common backend lowering starts.
|
||||||
|
|
||||||
### 12.1 Callable obligations
|
### 12.1 Callable obligations
|
||||||
|
|
||||||
@@ -170,7 +175,7 @@ Each executable callsite in `IRBackend` must be classified into exactly one cate
|
|||||||
2. `CALL_HOST`,
|
2. `CALL_HOST`,
|
||||||
3. `CALL_INTRINSIC`.
|
3. `CALL_INTRINSIC`.
|
||||||
|
|
||||||
Backend lowering must not infer this category by textual heuristics.
|
PBS lowering must not leave this category for backend inference by textual heuristics.
|
||||||
|
|
||||||
### 12.3 Host-backed metadata obligations
|
### 12.3 Host-backed metadata obligations
|
||||||
|
|
||||||
@@ -187,11 +192,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;
|
- 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)]`;
|
- 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;
|
- the preserved symbolic operand MUST remain attributable to a backend-provided `Addressable` identity;
|
||||||
- backend stages MUST be able to rewrite that symbolic operand into runtime-facing `asset_id` before the final low-level host path is emitted.
|
- 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.
|
||||||
|
|
||||||
When an expression statement leaves a materialized runtime value on the stack:
|
When an expression statement leaves a materialized runtime value on the stack:
|
||||||
|
|
||||||
- `IRBackend` lowering MUST emit explicit discard behavior rather than relying on implicit backend stack cleanup;
|
- PBS lowering into `IRBackend` MUST emit explicit discard behavior rather than relying on implicit backend stack cleanup;
|
||||||
- for single-slot materialized values this discard is represented by `POP`;
|
- 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.
|
- and the discard path MUST preserve stack-accounting validity for subsequent backend lowering stages.
|
||||||
|
|
||||||
@@ -218,20 +223,18 @@ It does not replace:
|
|||||||
2. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`,
|
2. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`,
|
||||||
3. or `docs/specs/compiler/15. Bytecode and PBX Mapping Specification.md`.
|
3. or `docs/specs/compiler/15. Bytecode and PBX Mapping Specification.md`.
|
||||||
|
|
||||||
### 12.7 Executable Lifecycle and Published Wrapper Obligation
|
### 12.7 Executable Lifecycle Declaration Obligation
|
||||||
|
|
||||||
For executable PBS frontends, backend handoff must preserve the compiler-selected published wrapper rather than a frontend-declared nominal entrypoint.
|
For executable PBS frontends, PBS lowering MUST emit a typed `IRLifecycleDeclaration` rather than assembling the published lifecycle.
|
||||||
|
|
||||||
At `IRBackend` emission time:
|
At frontend `IRBackend` emission time:
|
||||||
|
|
||||||
1. the lowered graph must contain explicit lifecycle structure for:
|
1. PBS MUST retain marker admission for `[Init]`, `[Frame]`, and `InitAllowed`,
|
||||||
- user-authored globals,
|
2. PBS MUST emit typed references for:
|
||||||
- file init fragments,
|
- file-init fragments that include global materialization and non-project `[Init]`,
|
||||||
- module init,
|
- the optional project-init callable, which is the `[Init]` colocated with `[Frame]`,
|
||||||
- project init when present,
|
- and the required frame-root callable marked with `[Frame]`,
|
||||||
- and the published frame wrapper,
|
3. the colocated project init MUST be excluded from file-init fragments,
|
||||||
2. the published frame wrapper must be the effective entrypoint identity handed to backend stages,
|
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,
|
||||||
3. the userland callable marked with `[Frame]` must remain distinguishable as the logical frame root,
|
5. PBS MUST NOT emit module init, project-init wrapper, published frame wrapper, physical entrypoint, or boot guard,
|
||||||
4. the wrapper must own final `FRAME_RET`,
|
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.
|
||||||
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.
|
|
||||||
|
|||||||
@@ -250,6 +250,8 @@ Rules:
|
|||||||
- A file may declare at most one `[Init]`.
|
- A file may declare at most one `[Init]`.
|
||||||
- The `[Init]` colocated with `[Frame]` is the project init.
|
- The `[Init]` colocated with `[Frame]` is the project init.
|
||||||
- Project init must be colocated with `[Frame]`.
|
- 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.
|
- `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 `Host` attribute.
|
||||||
- A host method signature in a reserved stdlib/interface module MUST carry exactly one `Capability` attribute.
|
- A host method signature in a reserved stdlib/interface module MUST carry exactly one `Capability` attribute.
|
||||||
|
|||||||
+17
-6
@@ -15,6 +15,10 @@ 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:
|
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.
|
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.
|
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.
|
It focuses on loader behavior and the minimum artifact contract the loader must consume.
|
||||||
|
|
||||||
@@ -44,16 +48,20 @@ This document does not define:
|
|||||||
|
|
||||||
This document follows two prior decisions:
|
This document follows two prior decisions:
|
||||||
|
|
||||||
1. Canonical host identity is defined by the hardware ABI as `(module, name, version)`.
|
1. Canonical host identity is defined by the runtime host registry 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.
|
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:
|
This document therefore treats:
|
||||||
|
|
||||||
- `declare host Gfx { fn draw_pixel(...); }`
|
- `declare host LowGfx { [Host(module = "gfx2d", name = "clear", version = 1)] fn clear(...); }`
|
||||||
|
|
||||||
as compile-time surface only, and treats:
|
as compile-time surface only, and treats:
|
||||||
|
|
||||||
- `("gfx", "draw_pixel", 1)`
|
- `("gfx2d", "clear", 1)`
|
||||||
|
|
||||||
as the normative runtime-facing identity.
|
as the normative runtime-facing identity.
|
||||||
|
|
||||||
@@ -63,7 +71,7 @@ The host-binding pipeline is:
|
|||||||
|
|
||||||
1. User code imports SDK surfaces such as `Gfx` from `@sdk:gfx` and `Composer` from `@sdk:composer`.
|
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.
|
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)`.
|
3. The compiler maps each host-backed SDK member to a canonical identity `(module, name, version)` that already exists in the runtime host registry.
|
||||||
4. The compiler emits those required canonical identities into the PBX `SYSC` table.
|
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>`.
|
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.
|
6. At cartridge load time, the loader resolves `SYSC` entries against the host syscall registry.
|
||||||
@@ -84,7 +92,7 @@ Every host binding is identified by the triple:
|
|||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- `module` is the canonical host subsystem namespace, such as `gfx` or `audio`.
|
- `module` is the canonical host subsystem namespace, such as `gfx2d` or `asset`.
|
||||||
- `name` is the canonical host operation name within that module.
|
- `name` is the canonical host operation name within that module.
|
||||||
- `version` is the canonical ABI version of that host operation.
|
- `version` is the canonical ABI version of that host operation.
|
||||||
- This identity is stable across source languages and SDK naming styles.
|
- This identity is stable across source languages and SDK naming styles.
|
||||||
@@ -310,7 +318,10 @@ Rules:
|
|||||||
- the loader resolves only against this canonical registry,
|
- the loader resolves only against this canonical registry,
|
||||||
- unknown identities are load errors,
|
- unknown identities are load errors,
|
||||||
- successful resolution yields numeric syscall identifiers and associated metadata,
|
- successful resolution yields numeric syscall identifiers and associated metadata,
|
||||||
- the resolved metadata is authoritative for capability gating and later runtime verification.
|
- 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.
|
||||||
|
|
||||||
For the current asset runtime surface, the canonical registry entries include:
|
For the current asset runtime surface, the canonical registry entries include:
|
||||||
|
|
||||||
|
|||||||
+82
-30
@@ -16,7 +16,11 @@ Its purpose is to make the stdlib:
|
|||||||
|
|
||||||
This document complements the normative language-level model in:
|
This document complements the normative language-level model in:
|
||||||
|
|
||||||
- [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)
|
- [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.
|
||||||
|
|
||||||
## 2. Scope
|
## 2. Scope
|
||||||
|
|
||||||
@@ -53,52 +57,66 @@ The recommended Studio layout is:
|
|||||||
```text
|
```text
|
||||||
prometeu-compiler/frontends/prometeu-frontend-pbs/
|
prometeu-compiler/frontends/prometeu-frontend-pbs/
|
||||||
src/main/resources/
|
src/main/resources/
|
||||||
stdlib/
|
<target>/
|
||||||
1/
|
stdlib/
|
||||||
sdk/
|
1/
|
||||||
composer/
|
core/
|
||||||
main.pbs
|
color/
|
||||||
mod.barrel
|
main.pbs
|
||||||
gfx/
|
mod.barrel
|
||||||
main.pbs
|
sdk/
|
||||||
mod.barrel
|
asset/
|
||||||
asset/
|
main.pbs
|
||||||
main.pbs
|
mod.barrel
|
||||||
mod.barrel
|
composer/
|
||||||
audio/
|
main.pbs
|
||||||
main.pbs
|
mod.barrel
|
||||||
mod.barrel
|
gfx/
|
||||||
core/
|
main.pbs
|
||||||
math/
|
mod.barrel
|
||||||
main.pbs
|
input/
|
||||||
mod.barrel
|
main.pbs
|
||||||
|
mod.barrel
|
||||||
|
log/
|
||||||
|
main.pbs
|
||||||
|
mod.barrel
|
||||||
```
|
```
|
||||||
|
|
||||||
Interpretation:
|
Interpretation:
|
||||||
|
|
||||||
- `stdlib/1` selects stdlib major line `1`,
|
- `<target>` is the `AppMode` export name (`game` for the current line-1 environment),
|
||||||
|
- `game/stdlib/1` selects stdlib major line `1` for that target,
|
||||||
- `sdk` and `core` are reserved project spaces,
|
- `sdk` and `core` are reserved project spaces,
|
||||||
- `composer`, `gfx`, `audio`, `math` are module paths within those reserved spaces,
|
- current line `1` modules are `color`, `asset`, `composer`, `gfx`, `input`, and `log`,
|
||||||
- `main.pbs` and `mod.barrel` form the interface module contents.
|
- `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
|
## 5. Logical Mapping
|
||||||
|
|
||||||
The compiler must treat the physical layout as a logical stdlib environment.
|
The compiler must treat the physical layout as a logical stdlib environment.
|
||||||
|
|
||||||
Required mapping:
|
Required mapping:
|
||||||
|
|
||||||
- `stdlib/<N>/sdk/gfx` -> `@sdk:gfx`
|
- `<target>/stdlib/<N>/<space>/<module>` -> `@<space>:<module>`
|
||||||
- `stdlib/<N>/sdk/composer` -> `@sdk:composer`
|
|
||||||
- `stdlib/<N>/sdk/asset` -> `@sdk:asset`
|
Current line `1` (`game`) mapping:
|
||||||
- `stdlib/<N>/sdk/audio` -> `@sdk:audio`
|
|
||||||
- `stdlib/<N>/core/math` -> `@core:math`
|
- `game/stdlib/1/core/color` -> `@core:color`
|
||||||
- `stdlib/<N>/core/math/vector` -> `@core:math/vector`
|
- `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`
|
||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- physical storage is an implementation detail,
|
- physical storage is an implementation detail,
|
||||||
- logical module identity is authoritative,
|
- logical module identity is authoritative,
|
||||||
- callers of the resolver should work with logical addresses such as `@sdk:gfx` and `@sdk:composer`, not resource paths.
|
- 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.
|
||||||
|
|
||||||
## 6. Module File Convention
|
## 6. Module File Convention
|
||||||
|
|
||||||
@@ -150,7 +168,8 @@ Minimum operations:
|
|||||||
|
|
||||||
- `resolve(@sdk:gfx)`
|
- `resolve(@sdk:gfx)`
|
||||||
- `resolve(@sdk:composer)`
|
- `resolve(@sdk:composer)`
|
||||||
- `resolve(@core:math/vector)`
|
- `resolve(@sdk:input)`
|
||||||
|
- `resolve(@core:color)`
|
||||||
|
|
||||||
### 7.3 `StdlibModuleSource`
|
### 7.3 `StdlibModuleSource`
|
||||||
|
|
||||||
@@ -304,3 +323,36 @@ The current Studio direction is:
|
|||||||
4. the compiler should use explicit abstractions such as `StdlibEnvironment` and `StdlibModuleResolver`,
|
4. the compiler should use explicit abstractions such as `StdlibEnvironment` and `StdlibModuleResolver`,
|
||||||
5. stdlib interface modules are parsed with the normal PBS parser and validated in interface-module mode,
|
5. stdlib interface modules are parsed with the normal PBS parser and validated in interface-module mode,
|
||||||
6. reserved attributes such as `[Host(...)]` are extracted as compile-time metadata for later lowering.
|
6. reserved attributes such as `[Host(...)]` are extracted as compile-time metadata for later lowering.
|
||||||
|
|
||||||
|
## 13. Installed Language and SDK Reference Bundle
|
||||||
|
|
||||||
|
The PBS frontend distribution MUST provide local, indexed documentation through
|
||||||
|
the frontend reference-provider contract. This packaging does not create a new
|
||||||
|
normative specification: the numbered PBS documents in their owner directory
|
||||||
|
remain authoritative, and the quickstart/example remain informative.
|
||||||
|
|
||||||
|
The build MUST generate the reference index from owner-maintained sources:
|
||||||
|
|
||||||
|
- this directory's numbered specifications and README quickstart;
|
||||||
|
- the frontend's example manifest, PBS source and barrel;
|
||||||
|
- the actual packaged SDK `.pbs` and `.barrel` files, including their documentation.
|
||||||
|
|
||||||
|
Generated copies MUST NOT be edited independently. SDK declarations MUST NOT be
|
||||||
|
rewritten to manufacture a documentation-only API. The index MUST contain stable
|
||||||
|
reference identities, titles, kinds, packaged-resource identities, content hashes
|
||||||
|
and applicable SDK major/target. The loader MUST reject missing/corrupted indexed
|
||||||
|
content instead of advertising unreadable references or consulting a checkout.
|
||||||
|
|
||||||
|
For the current distribution, SDK/example selection is Game / major 1. The general
|
||||||
|
PBS specifications remain available for other selections, but Game SDK 1 references
|
||||||
|
MUST NOT be presented as another SDK version or target. An absent SDK reference
|
||||||
|
set MUST be explicit to consumers.
|
||||||
|
|
||||||
|
Language, compiler, SDK and index-schema versions remain independent. General
|
||||||
|
specification references use an unknown release version when owner release
|
||||||
|
metadata is absent; SDK-associated references identify the installed SDK major.
|
||||||
|
Content hashes identify the packaged texts, not a semantic language release.
|
||||||
|
|
||||||
|
Conformance MUST include reading all indexed references from installed JARs outside
|
||||||
|
the repository and compiling the shipped example against the installed SDK. No
|
||||||
|
network access or source checkout may be required by that reference-read path.
|
||||||
|
|||||||
@@ -102,17 +102,21 @@ Executable PBS programs have a logical bootstrap sequence before ordinary frame
|
|||||||
Normative order:
|
Normative order:
|
||||||
|
|
||||||
1. materialize globals for each file according to dependency order,
|
1. materialize globals for each file according to dependency order,
|
||||||
2. execute that file's `[Init]`, if present,
|
2. execute that file's non-project `[Init]`, if present,
|
||||||
3. compose those steps into one synthetic module init per module,
|
3. compose those steps into one synthetic module init per module,
|
||||||
4. execute project init, if present,
|
4. execute project init exactly once, if present, after all module initializers,
|
||||||
5. then invoke the userland callable marked with `[Frame]`.
|
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:
|
Lifecycle bootstrap is one-shot:
|
||||||
|
|
||||||
- no automatic retry occurs after boot failure,
|
- no automatic retry occurs after boot failure,
|
||||||
- failure during module init aborts boot,
|
- failure during module init aborts boot,
|
||||||
- failure during project 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
|
## 6.2 Logical frame root and physical wrapper
|
||||||
|
|
||||||
PBS distinguishes the logical frame root from the physical published entrypoint:
|
PBS distinguishes the logical frame root from the physical published entrypoint:
|
||||||
|
|||||||
@@ -2,6 +2,73 @@
|
|||||||
|
|
||||||
This directory contains the normative PBS specification set.
|
This directory contains the normative PBS specification set.
|
||||||
|
|
||||||
|
## Installed Quickstart (Informative)
|
||||||
|
|
||||||
|
This guide and the numbered specifications are packaged with the PBS frontend.
|
||||||
|
They describe the installed distribution, not a promise of a numbered language
|
||||||
|
release. A spec's `Draft v1` status is not the compiler version or SDK version.
|
||||||
|
The project manifest selects the SDK major with `stdlib`; current packaged
|
||||||
|
Game SDK resources use major `1`. Unknown language/compiler versions remain
|
||||||
|
unknown in Studio's context.
|
||||||
|
|
||||||
|
For an external coding agent:
|
||||||
|
|
||||||
|
1. Request `studio_project_context` for the absolute root of the open project.
|
||||||
|
2. Read `pbs:quickstart`, `pbs:spec:3` (syntax), `pbs:spec:4` (static semantics)
|
||||||
|
and the relevant SDK reference IDs returned in that context. Continue pages
|
||||||
|
until `nextOffset` is null. References are IDs, not filesystem paths.
|
||||||
|
3. Inspect the project and its dependencies before changing source. Only edit
|
||||||
|
the project's editable scope, excluding read-only SDK/external libraries.
|
||||||
|
4. Use the installed LSP and compiler to check changes. When the corresponding
|
||||||
|
MCP tools are available, acquire project control after the developer's DEV
|
||||||
|
grant, then use the advertised language/build tools. Documentation reads do
|
||||||
|
not require that grant. Missing tools/capabilities must not be assumed.
|
||||||
|
5. Build and test small changes. Runtime execution also requires a compatible
|
||||||
|
configured runtime; reading references does not install one.
|
||||||
|
|
||||||
|
### Small Game Project
|
||||||
|
|
||||||
|
The installed example has three separately indexed files:
|
||||||
|
|
||||||
|
- `pbs:example:game:1:prometeu.json`: a Game manifest with `language: pbs`,
|
||||||
|
`stdlib: 1` (serialized as a string), and no external dependencies;
|
||||||
|
- `pbs:example:game:1:src/main.pbs`: `[Init]` and `[Frame]` functions drawing a
|
||||||
|
moving rectangle through `Gfx` and constructing colors through `Color`;
|
||||||
|
- `pbs:example:game:1:src/mod.barrel`: the module's public declarations.
|
||||||
|
|
||||||
|
Copy these reference texts to the corresponding paths only when creating that
|
||||||
|
example in your editable project. The example is compiled in the test suite;
|
||||||
|
it is not a complete game or a claim that every requested gameplay abstraction
|
||||||
|
already exists. If a project has no external dependencies, no registry is needed.
|
||||||
|
For dependencies, follow the installed compiler's manifest/registry requirements.
|
||||||
|
|
||||||
|
PBS source lives under `src` for the installed provider. Functions use `fn`,
|
||||||
|
typed parameters and `->` return types. `let` declares a local binding;
|
||||||
|
`declare global` declares persistent global state. Imports name exports and a
|
||||||
|
module address, for example `import { Gfx } from @sdk:gfx;`. A `mod.barrel`
|
||||||
|
describes a module's public surface. Read the syntax/static-semantics chapters
|
||||||
|
for exact rules rather than inferring compatibility with another language.
|
||||||
|
|
||||||
|
### SDK Navigation and Limits
|
||||||
|
|
||||||
|
`pbs:sdk:game:1:sdk/gfx/main.pbs` exposes the actual installed Gfx source,
|
||||||
|
including documentation comments and signatures. Its `mod.barrel` reference
|
||||||
|
defines exports. Equivalent references exist for `sdk/asset`, `sdk/composer`,
|
||||||
|
`sdk/input`, `sdk/log`, and `core/color`. Read those interfaces before calling
|
||||||
|
them. Game SDK 1 does not currently ship `audio` or `core/math` modules.
|
||||||
|
|
||||||
|
Ordinary game source uses public services such as `Gfx`; it must not manufacture
|
||||||
|
host bindings or mutate SDK declarations. Asset/composer workflows require their
|
||||||
|
real asset/scene data and runtime capabilities. Reference availability does not
|
||||||
|
guarantee those project resources exist. SDK or tooling limitations should be
|
||||||
|
reported for separate work, not patched in read-only dependencies.
|
||||||
|
|
||||||
|
The reference index is generated from these owner-maintained documents and the
|
||||||
|
frontend's SDK/example resources. The index schema revision is not a language
|
||||||
|
version. Source hashes bind texts to the installed bundle; no repository checkout
|
||||||
|
or network is needed to read them. The numbered specifications remain normative;
|
||||||
|
this onboarding section and example are explanatory, not a second specification.
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
Specs define the official PBS language/frontend contract.
|
Specs define the official PBS language/frontend contract.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# PBS Bytecode and PBX Mapping Specification
|
# Bytecode and PBX Mapping Specification
|
||||||
|
|
||||||
Status: Draft v1 (Backend Baseline)
|
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
|
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,6 +9,10 @@ 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.
|
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
|
## 2. Scope
|
||||||
|
|
||||||
This document defines:
|
This document defines:
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ 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 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
|
## 2. Scope
|
||||||
|
|
||||||
This document is intended to define:
|
This document is intended to define:
|
||||||
@@ -28,15 +31,22 @@ This document does not define:
|
|||||||
|
|
||||||
Normative precedence:
|
Normative precedence:
|
||||||
|
|
||||||
1. `5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
1. Runtime intrinsic catalog (`../runtime/docs/vm-arch/INTRINSICS.csv`; Studio mirror `docs/vm-arch/INTRINSICS.csv`)
|
||||||
2. `8. Stdlib Environment Packaging and Loading Specification.md`
|
2. Runtime host ABI (`../runtime/docs/specs/runtime/16-host-abi-and-syscalls.md` and `SyscallMeta`)
|
||||||
3. `6. VM-owned vs Host-backed.md`
|
3. `5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
||||||
4. `6.1. Intrinsics and Builtin Types Specification.md`
|
4. `8. Stdlib Environment Packaging and Loading Specification.md`
|
||||||
5. `6.2. Host ABI Binding and Loader Resolution Specification.md`
|
5. `6. VM-owned vs Host-backed.md`
|
||||||
6. This document
|
6. `6.1. Intrinsics and Builtin Types Specification.md`
|
||||||
|
7. `6.2. Host ABI Binding and Loader Resolution Specification.md`
|
||||||
|
8. This document
|
||||||
|
|
||||||
If a rule here conflicts with higher-precedence specs, it is invalid.
|
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
|
## 4. Normative Inputs
|
||||||
|
|
||||||
This document depends on, at minimum:
|
This document depends on, at minimum:
|
||||||
@@ -57,6 +67,9 @@ The following inputs are already fixed elsewhere and must not be contradicted he
|
|||||||
- User code must import stdlib modules explicitly.
|
- User code must import stdlib modules explicitly.
|
||||||
- Canonical host identity comes from reserved host-binding metadata, not from source owner spelling.
|
- 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.
|
- 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
|
## 6. Initial Section Targets
|
||||||
|
|
||||||
@@ -78,7 +91,10 @@ 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.
|
- Whether `@core:*` is specified as language-adjacent utility surface or as ordinary stdlib contract.
|
||||||
- How stdlib API evolution is documented and conformance-tested.
|
- How stdlib API evolution is documented and conformance-tested.
|
||||||
- Whether some interface modules remain toolchain-private and outside user-facing stdlib surface.
|
- Whether some interface modules remain toolchain-private and outside user-facing stdlib surface.
|
||||||
- Whether builtin shells may appear in `@sdk:*` as well as `@core:*`, or whether `@sdk:*` should remain host-facing only by policy.
|
|
||||||
|
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`.
|
||||||
|
|
||||||
## 8. Non-Goals
|
## 8. Non-Goals
|
||||||
|
|
||||||
@@ -127,6 +143,12 @@ Rules:
|
|||||||
- but ownership remains governed by the VM-owned vs host-backed classification,
|
- 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.
|
- 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
|
## 11. Builtin Shell Surfaces
|
||||||
|
|
||||||
Reserved stdlib modules may expose builtin declarations as compile-time-only
|
Reserved stdlib modules may expose builtin declarations as compile-time-only
|
||||||
@@ -205,6 +227,10 @@ Their canonical runtime-facing identities still come from builtin metadata such
|
|||||||
as `BuiltinType(name="vec2", version=1)` and
|
as `BuiltinType(name="vec2", version=1)` and
|
||||||
`BuiltinConst(target="vec2", name="zero", version=1)`.
|
`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
|
## 14. Deterministic Stdlib Surface Failures
|
||||||
|
|
||||||
At minimum, a conforming implementation must reject:
|
At minimum, a conforming implementation must reject:
|
||||||
@@ -214,3 +240,15 @@ At minimum, a conforming implementation must reject:
|
|||||||
3. a user-facing stdlib module that exports executable PBS bodies for builtin semantics,
|
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,
|
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.
|
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,18 +1,21 @@
|
|||||||
# PBS Verification and Safety Checks Specification
|
# Compiler Verification and Safety Checks Specification
|
||||||
|
|
||||||
Status: Draft v1 (Quality-Gate Baseline)
|
Status: Draft v1 (Quality-Gate Baseline)
|
||||||
Applies to: test-backed safety gates for backend compiler stages and integration regression safety checks against runtime
|
Applies to: test-backed safety gates for common compiler stages, validation ownership across executable frontends, and integration regression safety checks against runtime
|
||||||
|
|
||||||
## 1. Purpose
|
## 1. Purpose
|
||||||
|
|
||||||
This document defines the minimum safety/verification quality gates that must be enforced for executable backend pipelines.
|
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.
|
||||||
|
|
||||||
Its purpose is to keep safety measurable and deterministic across:
|
Its purpose is to keep safety measurable and deterministic across:
|
||||||
|
|
||||||
- lowering,
|
- lowering,
|
||||||
- optimization,
|
- optimization,
|
||||||
- emission,
|
- emission,
|
||||||
- and runtime integration boundaries.
|
- 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.
|
||||||
|
|
||||||
## 2. Scope
|
## 2. Scope
|
||||||
|
|
||||||
@@ -20,37 +23,41 @@ This document defines:
|
|||||||
|
|
||||||
- mandatory compiler-stage safety checks for executable pipeline stages,
|
- mandatory compiler-stage safety checks for executable pipeline stages,
|
||||||
- conditional integration safety regression checks against runtime line,
|
- conditional integration safety regression checks against runtime line,
|
||||||
- and evidence requirements for safety-related support claims.
|
- evidence requirements for safety-related support claims,
|
||||||
|
- and validation-ownership rules that apply to all executable frontends.
|
||||||
|
|
||||||
This document does not define:
|
This document does not define:
|
||||||
|
|
||||||
- full runtime verifier algorithm internals,
|
- full runtime verifier algorithm internals,
|
||||||
- formal proof of all runtime safety properties,
|
- formal proof of all runtime safety properties,
|
||||||
- or one mandatory verifier/optimizer architecture.
|
- one mandatory verifier/optimizer architecture,
|
||||||
|
- PBS syntax or static-semantics catalogs,
|
||||||
|
- or a generic validator-core package.
|
||||||
|
|
||||||
## 3. Authority and Precedence
|
## 3. Authority and Precedence
|
||||||
|
|
||||||
Normative precedence:
|
Normative precedence:
|
||||||
|
|
||||||
1. `docs/pbs/specs/2. Governance and Versioning.md`
|
1. Runtime authority (`docs/specs/hardware/topics/chapter-2.md`, `chapter-3.md`, `chapter-9.md`, `chapter-12.md`, `chapter-16.md`)
|
||||||
2. `docs/pbs/specs/12. Diagnostics Specification.md`
|
2. Bytecode authority (`docs/specs/bytecode/ISA_CORE.md`)
|
||||||
3. `20. IRBackend to IRVM Lowering Specification.md`
|
3. `20. IRBackend to IRVM Lowering Specification.md`
|
||||||
4. `21. IRVM Optimization Pipeline Specification.md`
|
4. `21. IRVM Optimization Pipeline Specification.md`
|
||||||
5. `15. Bytecode and PBX Mapping Specification.md`
|
5. `15. Bytecode and PBX Mapping Specification.md`
|
||||||
6. `13. Conformance Test Specification.md`
|
6. `13. Conformance Test Specification.md`
|
||||||
7. This document
|
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 higher-precedence authorities, it is invalid.
|
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.
|
||||||
|
|
||||||
## 4. Normative Inputs
|
## 4. Normative Inputs
|
||||||
|
|
||||||
This document depends on:
|
This document depends on:
|
||||||
|
|
||||||
- `docs/pbs/specs/12. Diagnostics Specification.md`
|
|
||||||
- `13. Conformance Test Specification.md`
|
- `13. Conformance Test Specification.md`
|
||||||
- `15. Bytecode and PBX Mapping Specification.md`
|
- `15. Bytecode and PBX Mapping Specification.md`
|
||||||
- `20. IRBackend to IRVM Lowering Specification.md`
|
- `20. IRBackend to IRVM Lowering Specification.md`
|
||||||
- `21. IRVM Optimization Pipeline Specification.md`
|
- `21. IRVM Optimization Pipeline Specification.md`
|
||||||
|
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md` as the current frontend diagnostics catalog, not as the owner of this specification
|
||||||
|
|
||||||
## 5. Safety Gate Model
|
## 5. Safety Gate Model
|
||||||
|
|
||||||
@@ -133,3 +140,74 @@ This document is healthy when:
|
|||||||
2. executable backends have explicit S-I status (`pass`/`fail`/`deferred`),
|
2. executable backends have explicit S-I status (`pass`/`fail`/`deferred`),
|
||||||
3. integration safety regressions are preserved in tests,
|
3. integration safety regressions are preserved in tests,
|
||||||
4. and safety-related support claims remain evidence-backed.
|
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 depend on types from the PBS frontend module (`prometeu-frontend-pbs`). The package `p.studio.compiler.pbs` is not the complete boundary; facades shipped by that module remain PBS-owned. Platform validators MUST NOT discover roles from `__pbs.` prefixes.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# PBS IRBackend to IRVM Lowering Specification
|
# IRBackend to IRVM Lowering Specification
|
||||||
|
|
||||||
Status: Draft v1 (Backend Baseline)
|
Status: Draft v1 (Backend Baseline)
|
||||||
Applies to: executable-backend lowering from `IRBackend` handoff into `IRVM`
|
Applies to: executable-backend lowering from the common `IRBackend` handoff into `IRVM`
|
||||||
|
|
||||||
## 1. Purpose
|
## 1. Purpose
|
||||||
|
|
||||||
@@ -9,11 +9,20 @@ 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.
|
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
|
## 2. Scope
|
||||||
|
|
||||||
This document defines:
|
This document defines:
|
||||||
|
|
||||||
- required backend preconditions before `IRBackend -> IRVM` starts,
|
- required backend preconditions before `IRBackend -> IRVM` starts,
|
||||||
|
- allowed language-neutral `IRBackend` contract concepts at the backend boundary,
|
||||||
- `IRVM` structural obligations needed before optimization/emission,
|
- `IRVM` structural obligations needed before optimization/emission,
|
||||||
- deterministic function-id assignment and control-flow lowering obligations,
|
- deterministic function-id assignment and control-flow lowering obligations,
|
||||||
- callsite lowering obligations across function, host-backed, and VM-owned intrinsic paths,
|
- callsite lowering obligations across function, host-backed, and VM-owned intrinsic paths,
|
||||||
@@ -25,7 +34,8 @@ This document does not define:
|
|||||||
- binary PBX layout details,
|
- binary PBX layout details,
|
||||||
- loader patching internals,
|
- loader patching internals,
|
||||||
- runtime execution internals,
|
- runtime execution internals,
|
||||||
- or one mandatory optimizer implementation.
|
- one mandatory optimizer implementation,
|
||||||
|
- or frontend-specific lowering rules before `IRBackend` emission.
|
||||||
|
|
||||||
## 3. Authority and Precedence
|
## 3. Authority and Precedence
|
||||||
|
|
||||||
@@ -33,8 +43,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`)
|
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`)
|
2. Bytecode authority (`docs/specs/bytecode/ISA_CORE.md`)
|
||||||
3. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
3. This document
|
||||||
4. This document
|
4. Frontend-specific lowering specifications, including `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||||
|
|
||||||
If a rule here conflicts with higher-precedence authorities, it is invalid.
|
If a rule here conflicts with higher-precedence authorities, it is invalid.
|
||||||
|
|
||||||
@@ -42,22 +52,106 @@ If a rule here conflicts with higher-precedence authorities, it is invalid.
|
|||||||
|
|
||||||
This document depends on:
|
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.1. Intrinsics and Builtin Types Specification.md`
|
||||||
- `docs/specs/compiler-languages/pbs/6.2. Host ABI Binding and Loader Resolution 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`
|
- `15. Bytecode and PBX Mapping Specification.md`
|
||||||
- `21. IRVM Optimization Pipeline 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 types from the PBS frontend module (`prometeu-frontend-pbs`). The package `p.studio.compiler.pbs` is not the complete boundary.
|
||||||
|
|
||||||
|
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 from the PBS frontend module (`prometeu-frontend-pbs`) or an equivalent language frontend module 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
|
## 5. Backend Entry Preconditions
|
||||||
|
|
||||||
Lowering from `IRBackend` to `IRVM` may start only when:
|
Lowering from `IRBackend` to `IRVM` may start only when:
|
||||||
|
|
||||||
1. frontend admission to `IRBackend` is complete for the active slice,
|
1. frontend admission to `IRBackend` is complete for the active slice,
|
||||||
2. required callsite categories (`CALL_FUNC`/`CALL_HOST`/`CALL_INTRINSIC`) are available,
|
2. common lifecycle assembly has already materialized derived artifacts for an executable handoff,
|
||||||
3. required canonical host/intrinsic metadata is available for admitted callsites,
|
3. required callsite categories (`CALL_FUNC`/`CALL_HOST`/`CALL_INTRINSIC`) are available,
|
||||||
4. dependency-scoped fail-fast exclusions have already been applied at the `IRBackend` boundary,
|
4. required canonical host/intrinsic metadata is available for admitted callsites,
|
||||||
5. compiler-selected published-wrapper entrypoint identity is present and unambiguous,
|
5. dependency-scoped fail-fast exclusions have already been applied at the `IRBackend` boundary,
|
||||||
6. and target `vm_profile` is selected deterministically.
|
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.
|
||||||
|
|
||||||
## 6. IRVM Model Obligations
|
## 6. IRVM Model Obligations
|
||||||
|
|
||||||
@@ -98,12 +192,15 @@ Function indexing must be deterministic:
|
|||||||
4. manifest-owned or name-only entrypoint fallback is forbidden,
|
4. manifest-owned or name-only entrypoint fallback is forbidden,
|
||||||
5. and identical admitted input graphs must produce identical function-id assignments.
|
5. and identical admitted input graphs must produce identical function-id assignments.
|
||||||
|
|
||||||
For PBS executable lowering:
|
For executable lowering:
|
||||||
|
|
||||||
- the userland callable marked with `[Frame]` remains the logical frame root,
|
- the declared frame-root callable remains the logical frame root,
|
||||||
- the wrapper path must contain final `FRAME_RET`,
|
- the assembled published wrapper is the physical entrypoint,
|
||||||
|
- the wrapper path must contain the final frame return,
|
||||||
- and lowering must preserve that distinction through `IRVM`.
|
- 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. Callsite Lowering Obligations
|
||||||
|
|
||||||
### 9.1 Function calls
|
### 9.1 Function calls
|
||||||
@@ -150,7 +247,7 @@ Before bytecode emission, backend must run structural pre-verification on lowere
|
|||||||
7. and structural validity of host/intrinsic call forms.
|
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`.
|
8. and structural validity of backend-owned symbolic-to-operational rewrites such as `Addressable -> asset_id`.
|
||||||
|
|
||||||
For PBS host-backed asset calls in v1, this validation includes the rewrite selected by preserved host metadata such as `[AssetLowering(param = N)]`.
|
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.
|
||||||
|
|
||||||
This pre-verification does not replace runtime verifier authority.
|
This pre-verification does not replace runtime verifier authority.
|
||||||
|
|
||||||
@@ -184,4 +281,6 @@ This document is healthy when:
|
|||||||
1. `IRBackend -> IRVM` obligations are explicit and testable,
|
1. `IRBackend -> IRVM` obligations are explicit and testable,
|
||||||
2. deterministic function/call/control-flow lowering rules are explicit,
|
2. deterministic function/call/control-flow lowering rules are explicit,
|
||||||
3. mandatory pre-verification boundary is explicit,
|
3. mandatory pre-verification boundary is explicit,
|
||||||
4. and scope boundaries with optimization/emission specs are 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.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# PBS IRVM Optimization Pipeline Specification
|
# IRVM Optimization Pipeline Specification
|
||||||
|
|
||||||
Status: Draft v1 (Pipeline Baseline)
|
Status: Draft v1 (Pipeline Baseline)
|
||||||
Applies to: placement and invariants of the `OptimizeIRVM` stage between lowering and bytecode emission
|
Applies to: placement and invariants of the `OptimizeIRVM` stage between lowering and bytecode emission
|
||||||
@@ -9,6 +9,10 @@ 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.
|
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
|
## 2. Scope
|
||||||
|
|
||||||
This document defines:
|
This document defines:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Status: Draft v1 (Traceability Baseline)
|
Status: Draft v1 (Traceability Baseline)
|
||||||
Applies to: compiler/backend conformance traceability for canonical stage order and entrypoint-specific contracts
|
Applies to: compiler/backend conformance traceability for canonical stage order and entrypoint-specific contracts
|
||||||
|
|
||||||
Last Updated: 2026-03-30
|
Last Updated: 2026-09-19
|
||||||
|
|
||||||
## 1. Purpose
|
## 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`
|
2. `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||||
3. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`
|
3. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`
|
||||||
4. `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
4. `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||||
5. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md` (Section 12 addendum only)
|
5. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md` (PBS lowering obligations only)
|
||||||
|
|
||||||
to concrete positive/negative test evidence and current status.
|
to concrete positive/negative test evidence and current status.
|
||||||
|
|
||||||
@@ -40,6 +40,22 @@ 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.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.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-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 depend on PBS frontend module types or match `__pbs.` prefixes. | `PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes`; `CommonBackendPbsPrefixScanTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes` | N/A | pass | ArchUnit covers PBS module origin, including facades outside `p.studio.compiler.pbs`; source scan still rejects `__pbs.` in backend, lifecycle, and 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 types from the PBS frontend module. | `PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes`; `PbsModuleBoundaryArchTest#irBackendModelsMustNotDependOnPbsModuleTypes` | N/A | pass | ArchUnit rejects PBS-module origin types in common production code, including facades outside `p.studio.compiler.pbs`. |
|
||||||
|
| 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`; `CommonBackendPbsPrefixScanTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes`; `PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes` | `LifecycleAssemblerServiceTest#assembleMustRejectPreMaterializedDerivedArtifacts` | pass | Derived wrappers and boot guard are common-owned; ArchUnit rejects PBS-module types and the source scan rejects `__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.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.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. |
|
| G20-6.4 | IRVM MUST preserve per-function slot and identity headers. | `IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch` | `IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch` | pass | Header mismatch is rejected deterministically. |
|
||||||
@@ -67,14 +83,19 @@ 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.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.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 | |
|
| 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`. | `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-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-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-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-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.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-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-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.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. |
|
| 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 | 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.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.1.1 | Callable identity MUST be preserved at handoff. | `IRBackendExecutableContractTest#aggregatorMustPreserveExecutableFunctionOrderDeterministically` | N/A | pass | |
|
| 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.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 | |
|
| PBS13-12.1.3 | Callable category MUST be preserved at handoff. | `PbsFrontendCompilerTest#shouldLowerExecutableFunctionsWithCallsiteCategories` | N/A | pass | |
|
||||||
@@ -103,7 +124,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.
|
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.
|
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` addendum MUST add a new matrix row before merge.
|
3. New normative MUSTs in specs `19/20/21` or PBS `13` lowering obligations MUST add a new matrix row before merge.
|
||||||
4. Conformance-relevant FE/BE code paths for hard-gate are:
|
4. Conformance-relevant FE/BE code paths for hard-gate are:
|
||||||
- `prometeu-compiler/prometeu-build-pipeline/`
|
- `prometeu-compiler/prometeu-build-pipeline/`
|
||||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/`
|
- `prometeu-compiler/frontends/prometeu-frontend-pbs/`
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Its purpose is to make the compiler usable through explicit entrypoints instead
|
|||||||
This document defines:
|
This document defines:
|
||||||
|
|
||||||
- the canonical stage order shared by compiler entrypoints,
|
- 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 `analyze`,
|
||||||
- the terminal stage and mandatory behavior of `compile`,
|
- the terminal stage and mandatory behavior of `compile`,
|
||||||
- the terminal stage and mandatory behavior of `build`,
|
- the terminal stage and mandatory behavior of `build`,
|
||||||
@@ -25,6 +26,7 @@ This document does not define:
|
|||||||
- one mandatory Java class or package layout,
|
- one mandatory Java class or package layout,
|
||||||
- editor-specific source providers or document-session providers,
|
- editor-specific source providers or document-session providers,
|
||||||
- frontend-specific semantic facts beyond the minimum shared `AnalysisSnapshot` contract,
|
- frontend-specific semantic facts beyond the minimum shared `AnalysisSnapshot` contract,
|
||||||
|
- dynamic frontend plugin discovery,
|
||||||
- or one mandatory CLI architecture.
|
- or one mandatory CLI architecture.
|
||||||
|
|
||||||
## 3. Authority and Precedence
|
## 3. Authority and Precedence
|
||||||
@@ -63,12 +65,13 @@ The canonical stage order is:
|
|||||||
1. `ResolveDepsPipelineStage`
|
1. `ResolveDepsPipelineStage`
|
||||||
2. `LoadSourcesPipelineStage`
|
2. `LoadSourcesPipelineStage`
|
||||||
3. `FrontendPhasePipelineStage`
|
3. `FrontendPhasePipelineStage`
|
||||||
4. `LowerToIRVMPipelineStage`
|
4. `AssembleLifecyclePipelineStage`
|
||||||
5. `OptimizeIRVMPipelineStage`
|
5. `LowerToIRVMPipelineStage`
|
||||||
6. `EmitBytecodePipelineStage`
|
6. `OptimizeIRVMPipelineStage`
|
||||||
7. `LinkBytecodePipelineStage`
|
7. `EmitBytecodePipelineStage`
|
||||||
8. `VerifyBytecodePipelineStage`
|
8. `LinkBytecodePipelineStage`
|
||||||
9. `WriteBytecodeArtifactPipelineStage`
|
9. `VerifyBytecodePipelineStage`
|
||||||
|
10. `WriteBytecodeArtifactPipelineStage`
|
||||||
|
|
||||||
Public entrypoints MAY terminate early according to this document, but they MUST NOT:
|
Public entrypoints MAY terminate early according to this document, but they MUST NOT:
|
||||||
|
|
||||||
@@ -80,21 +83,23 @@ Public entrypoints MAY terminate early according to this document, but they MUST
|
|||||||
|
|
||||||
### 6.1 `analyze`
|
### 6.1 `analyze`
|
||||||
|
|
||||||
`analyze` MUST terminate at `FrontendPhasePipelineStage`.
|
`analyze` MUST terminate at `AssembleLifecyclePipelineStage`.
|
||||||
|
|
||||||
`analyze` is defined as:
|
`analyze` is defined as:
|
||||||
|
|
||||||
1. `ResolveDeps`
|
1. `ResolveDeps`
|
||||||
2. `LoadSources`
|
2. `LoadSources`
|
||||||
3. `FrontendPhase`
|
3. `FrontendPhase`
|
||||||
|
4. `AssembleLifecycle`
|
||||||
|
|
||||||
`analyze` MUST:
|
`analyze` MUST:
|
||||||
|
|
||||||
1. resolve workspace/dependency inputs needed by the frontend,
|
1. resolve workspace/dependency inputs needed by the frontend,
|
||||||
2. load source surfaces admitted by the selected compiler configuration,
|
2. load source surfaces admitted by the selected compiler configuration,
|
||||||
3. run frontend semantic analysis,
|
3. run frontend semantic analysis and emit a declarative `IRBackend`,
|
||||||
4. return an `AnalysisSnapshot` or equivalent result contract,
|
4. assemble the common lifecycle from `IRLifecycleDeclaration` when present,
|
||||||
5. and remain free of backend artifact side effects.
|
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.
|
||||||
|
|
||||||
`analyze` MUST NOT:
|
`analyze` MUST NOT:
|
||||||
|
|
||||||
@@ -229,6 +234,88 @@ This authority model MUST NOT:
|
|||||||
2. move semantic inline hint policy into LSP,
|
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.
|
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.
|
||||||
|
|
||||||
|
When a frontend exposes definition or navigation, each returned location MUST identify a compiler-known physical source file. A resolved symbol without a physical file MUST produce an empty definition response. Tooling MUST NOT require virtual documents, untitled buffers, or synthetic URIs for this capability.
|
||||||
|
|
||||||
|
When a frontend exposes find-references, each returned usage or declaration location MUST identify a compiler-known physical source file. A cursor offset whose definition response is empty MUST produce an empty references response. Host `includeDeclaration` MAY add the canonical declaration location only when that declaration is a compiler-known physical source file; it MUST NOT invent a virtual, untitled, or synthetic location.
|
||||||
|
|
||||||
|
When a frontend exposes document symbols or outline, the result MUST be the named declaration tree of the requested document. Presence, hierarchy, and ranges MUST come from that document's recovered syntax tree. Semantic success MUST NOT be required. Semantic enrichment MUST NOT drop a named declaration that the syntax tree still exposes. A missing syntax tree MUST produce an empty list. Document symbols MUST NOT be a workspace symbol index, folding ranges, or a navigation list of foreign files.
|
||||||
|
|
||||||
|
When a frontend exposes workspace symbols, the result MUST be a flat search of named declarations whose locations identify compiler-known physical source files of the current analysis. Presence, names, kinds, details, and ranges MUST come from the recovered syntax of those files. Semantic success MUST NOT be required. Semantic enrichment MUST NOT drop a named declaration that the syntax tree still exposes. A missing analysis surface MUST produce an empty list. The workspace-symbol request MUST NOT require an open text document. A declaration without a compiler-known physical file MUST be omitted. Tooling MUST NOT require virtual documents, untitled buffers, or synthetic URIs for this capability. Workspace symbols MUST NOT be a document outline, folding ranges, a persistent symbol index, or a navigation list of virtual locations.
|
||||||
|
|
||||||
|
When a frontend exposes rename, the result MUST be a validated workspace edit of identifier spans whose locations identify compiler-known physical source files. Identity MUST be the physical declaration locations that definition returns at the cursor. A local or parameter name span MUST still be renameable when definition at that offset is empty. Each rewritten location MUST identify a compiler-known physical source file. A cursor that is not renameable, including builtins, virtual paths, unresolved names, keywords, comments, strings, import aliases and uses of those aliases, error case labels without their own span, and barrel files, MUST produce a protocol error or a null prepareRename result. Tooling MUST NOT return a successful empty workspace edit for a refused cursor or an invalid new name. The new name MUST be a language identifier that is not a keyword and MUST NOT collide in the same binding space, ignoring the sites being rewritten and the overload set being renamed. The server MUST NOT write files and MUST NOT rename file paths. Host prepareRename MUST advertise a prepareProvider when rename is exposed. Tooling MUST NOT require virtual documents, untitled buffers, or synthetic URIs for this capability.
|
||||||
|
|
||||||
|
When a frontend exposes code actions, the result MUST be quick fixes only: one workspace edit tied to a diagnostic of the requested physical document. The frontend MUST produce each repair from that document's syntax. Each repair MUST name the stable diagnostic code, the primary span, and exactly one local text edit. Tooling MUST transport that repair. Tooling MUST NOT choose the edit by parsing the diagnostic message or by a diagnostic-code table. A repair MUST NOT be a required field of compiler diagnostics and MUST NOT be published inside diagnostic data. The published diagnostic MUST carry the stable code so a later code-action request can match it. A repair MUST be returned only when the request context contains a diagnostic with the same code and the same primary range. An empty diagnostic context MUST produce an empty list. The edit MUST change only the requested physical source file. The server MUST NOT write files, MUST NOT return a command, and MUST NOT require a resolve round trip. A missing code-action capability MUST NOT advertise code actions and MUST produce an empty list rather than a protocol error. Virtual, untitled, or synthetic documents MUST NOT receive an edit. Code actions MUST NOT include organize-imports, source actions, refactors, or generated stubs unless a future accepted decision says so.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
When tooling publishes an editor diagnostic, `source` MUST be the `languageId` of the bound frontend project. `code` MUST be the stable compiler diagnostic code when one exists, and MUST be empty when the compiler diagnostic has none. Tooling MUST NOT copy that code into `source`. Tooling MUST NOT publish related locations, compiler phase, or a repair payload on the editor diagnostic.
|
||||||
|
|
||||||
|
When a frontend exposes document links, each link MUST cover the span of a module reference whose resolved destination is a compiler-known regular file. A module reference that does not resolve to a regular file MUST produce no link. Tooling MUST NOT target virtual, untitled, or synthetic URIs, including virtual stdlib documents. Document links MUST NOT replace definition. A missing document-link capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||||
|
|
||||||
|
When a frontend exposes folding ranges, the ranges MUST come from recovered syntax spans for top-level `fn`, `struct`, `service`, `contract`, `enum`, `error`, `callback`, and `host` declarations, their bodies, and `Doc` text blocks. A parameter list MUST fold from the parenthesis pair. A brace, parenthesis, or text-block delimiter that the recovered tree does not cover MUST still produce a token range, including an unmatched opener through the end of the text. Folding ranges MUST NOT be document symbols.
|
||||||
|
|
||||||
|
When a frontend exposes selection ranges, the chain at a cursor MUST run from the inside outward in this order: identifier, argument or parameter list, block or `Doc` text block, declaration. A layer that does not contain the cursor MUST be omitted. A missing folding or selection capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||||
|
|
||||||
|
When a frontend exposes call hierarchy, incoming and outgoing calls MUST be callsites found by walking call expressions in the syntax tree. The references index MUST NOT be used as the call graph. A cursor that is not on a function, method, or constructor MUST produce an empty prepare result. Type hierarchy MUST NOT be advertised. A missing call-hierarchy capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||||
|
|
||||||
|
When a frontend exposes completion inside a module reference, the candidates MUST be project and stdlib modules the current module resolver can already name. Completion outside a module reference MUST keep its existing member and general candidates. Completion items MUST stay eager. `resolveProvider` MUST stay false. Snippets and a new ranking score MUST NOT be added.
|
||||||
|
|
||||||
|
When a frontend exposes semantic tokens, the lexical token provider remains the baseline. An identifier token MAY be replaced with an existing semantic key when the same resolution used by hover names that symbol and an existing key matches it. Resolution failure, a broken file, or a symbol with no existing key MUST keep the baseline token. This overlay MUST NOT add a semantic-token key.
|
||||||
|
|
||||||
|
When a frontend exposes formatting, it MUST be full-document formatting only. Range formatting and on-type formatting MUST NOT be advertised. The formatter MUST reprint the existing token stream. It MUST NOT reorder declarations, join lines, or split lines. Indentation MUST be four spaces and MUST change only where brace or parenthesis nesting changes. The interior of a `Doc` text block MUST be copied unchanged. A comment MUST stay on the line of the token it already follows. A missing formatting capability MUST NOT be advertised and MUST produce an empty edit list rather than a protocol error.
|
||||||
|
|
||||||
|
`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
|
## 9. Public Surface Rule
|
||||||
|
|
||||||
The shared compiler public surface MUST expose explicit entrypoints equivalent in meaning to:
|
The shared compiler public surface MUST expose explicit entrypoints equivalent in meaning to:
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ Runtime-side reading semantics for `assets.pa` are defined upstream in `../runti
|
|||||||
5. A future shipper is a consumer of packer artifacts, not a co-author of the asset contract.
|
5. A future shipper is a consumer of packer artifacts, not a co-author of the asset contract.
|
||||||
6. Runtime reading semantics are not redefined by the packer.
|
6. Runtime reading semantics are not redefined by the packer.
|
||||||
7. The packer must stop at artifact publication, not cartridge assembly.
|
7. The packer must stop at artifact publication, not cartridge assembly.
|
||||||
|
8. The packer's Java package root is `p.packer`; it must not be moved under `p.studio` or treated as a Studio subdomain.
|
||||||
|
9. The packer must remain independently consumable by Studio, command-line tooling, build tooling, and future automation adapters.
|
||||||
|
10. No Packer module may depend on `p.studio`, Studio UI, or Studio application modules.
|
||||||
|
|
||||||
## Packer-Owned Artifacts
|
## Packer-Owned Artifacts
|
||||||
|
|
||||||
@@ -57,6 +60,18 @@ Rules:
|
|||||||
- shipper-specific workflow detail is deferred;
|
- shipper-specific workflow detail is deferred;
|
||||||
- published artifact names and meanings must remain documented and stable enough for later consumption.
|
- published artifact names and meanings must remain documented and stable enough for later consumption.
|
||||||
|
|
||||||
|
## Studio Consumption Boundary
|
||||||
|
|
||||||
|
Studio is a consumer of Packer capabilities, not the owner of Packer semantics.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- Studio should consume a stable, neutral, use-case-oriented public Packer API directly;
|
||||||
|
- Studio must not add a gateway that merely mirrors an already suitable public Packer API;
|
||||||
|
- when only concrete, static, infrastructure-oriented, unstable, or excessively broad integration is available, the Studio consumer may define a narrow consumer-owned gateway;
|
||||||
|
- implementations of Studio-owned gateways must stay outside Packer and outside the Studio Core functional contract;
|
||||||
|
- Studio projections and orchestration must not duplicate Packer validation, packing, diagnostic, concurrency, or artifact semantics.
|
||||||
|
|
||||||
## Non-Goals
|
## Non-Goals
|
||||||
|
|
||||||
- cartridge assembly flow
|
- cartridge assembly flow
|
||||||
|
|||||||
+16
-2
@@ -60,10 +60,24 @@ When the packer is embedded inside another host such as Studio, the host must bo
|
|||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- the embedded packer runtime must receive a typed event bus reference from the host when shared host visibility is part of the integration contract;
|
- the embedded packer runtime must receive a typed event sink or adapter from the host when shared host visibility is part of the integration contract;
|
||||||
- that reference is the baseline path for packer publish/subscribe integration in the embedded host;
|
- that reference is the baseline path for packer publish/subscribe integration in the embedded host;
|
||||||
- the embedded packer runtime must not quietly create a disconnected parallel event system when host integration expects shared operational visibility;
|
- the embedded packer runtime must not quietly create a disconnected parallel event system when host integration expects shared operational visibility;
|
||||||
- in Studio, this shared typed event bus reference is owned by the Studio `Container`.
|
- in Studio, bootstrap, shutdown, and event adaptation are owned by the `prometeu-app` composition root;
|
||||||
|
- the embedded integration must not use `p.studio.Container`, Spring context lookup, or another static service locator.
|
||||||
|
|
||||||
|
### Studio Dependency Rule
|
||||||
|
|
||||||
|
The dependency direction is always Studio to Packer.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- Studio Core may consume stable public contracts from `prometeu-packer-api` directly;
|
||||||
|
- a Studio-owned gateway is required only when an integration is concrete, static, infrastructure-oriented, unstable, excessively broad, or leaks provider lifecycle details;
|
||||||
|
- such a gateway must expose only the capabilities required by its consuming Studio module;
|
||||||
|
- gateway implementations and Packer bootstrap belong in `prometeu-app` or another explicit infrastructure adapter;
|
||||||
|
- the JavaFX adapter must consume neutral Studio API contracts and must not call Packer directly;
|
||||||
|
- Packer must not depend on `p.studio` and must not publish Studio UI events as part of its domain contract.
|
||||||
|
|
||||||
Baseline core services:
|
Baseline core services:
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ Specs should normally be fed by:
|
|||||||
|
|
||||||
If a spec edit would require guessing an unresolved design choice, stop and surface the missing decision first.
|
If a spec edit would require guessing an unresolved design choice, stop and surface the missing decision first.
|
||||||
|
|
||||||
|
## Integration Boundary
|
||||||
|
|
||||||
|
The Packer package root is `p.packer`, and Packer remains autonomous from Studio. Studio consumes stable public Packer APIs directly and introduces a narrow consumer-owned gateway only for concrete, static, unstable, or infrastructure-specific integration. Packer never depends on `p.studio`.
|
||||||
|
|
||||||
## Current Corpus
|
## Current Corpus
|
||||||
|
|
||||||
The current packer core corpus is:
|
The current packer core corpus is:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Purpose: Define the normative shell structure of the Studio UI.
|
|||||||
|
|
||||||
## Authority and Precedence
|
## Authority and Precedence
|
||||||
|
|
||||||
This specification consolidates the accepted Studio shell decision into normative form.
|
This specification consolidates the accepted Studio shell decision into normative form. DEC-0060 adds DEV and project-scoped automation authority; its detailed behavior is owned by the [DEV and Automation Specification](10.%20DEV%20and%20Automation%20Specification.md).
|
||||||
|
|
||||||
## Normative Inputs
|
## Normative Inputs
|
||||||
|
|
||||||
@@ -46,10 +46,13 @@ The baseline workspace set includes:
|
|||||||
|
|
||||||
- Asset Management;
|
- Asset Management;
|
||||||
- Debugger/Profiler;
|
- Debugger/Profiler;
|
||||||
|
- DEV, for granting/reclaiming project control and observing external-agent automation;
|
||||||
- Shipper, temporarily represented by the current `BuilderWorkspace`.
|
- Shipper, temporarily represented by the current `BuilderWorkspace`.
|
||||||
|
|
||||||
`BuilderWorkspace` is transitional and must not be treated as a long-term architectural reference for the final shipping surface.
|
`BuilderWorkspace` is transitional and must not be treated as a long-term architectural reference for the final shipping surface.
|
||||||
|
|
||||||
|
DEV MUST remain separate from human Debug and MUST NOT offer chat or manual Play/input for the headless session. Selecting, hiding or switching away from DEV MUST NOT grant or release project authority. The shell's always-visible run surface remains visible, but conflicting manual actions MUST be unavailable while project control is ceded, including while waiting for an agent. Services MUST enforce the same exclusion; shell bindings alone are insufficient.
|
||||||
|
|
||||||
## Workspace Architecture Model
|
## Workspace Architecture Model
|
||||||
|
|
||||||
The shell-level workspace host exists to mount independently authored workspaces under one Studio contract.
|
The shell-level workspace host exists to mount independently authored workspaces under one Studio contract.
|
||||||
@@ -57,11 +60,13 @@ The shell-level workspace host exists to mount independently authored workspaces
|
|||||||
Baseline workspace architecture rules are:
|
Baseline workspace architecture rules are:
|
||||||
|
|
||||||
- each workspace should have a composition root that mounts the workspace into the shell;
|
- each workspace should have a composition root that mounts the workspace into the shell;
|
||||||
|
- the shell and workspace composition roots must receive neutral Studio API services through explicit constructor or factory injection;
|
||||||
- a workspace composition root should coordinate workspace services, state orchestration, and structural sync, but it should not own every local render path directly;
|
- a workspace composition root should coordinate workspace services, state orchestration, and structural sync, but it should not own every local render path directly;
|
||||||
- project-session services that must survive workspace focus changes should be owned above individual workspace focus lifecycles and then consumed by workspace composition roots;
|
- project-session services that must survive workspace focus changes should be owned above individual workspace focus lifecycles and then consumed by workspace composition roots;
|
||||||
- event-observing workspace controls must be lifecycle-managed;
|
- event-observing workspace controls must be lifecycle-managed;
|
||||||
- workspace-local updates should flow through the Studio event system rather than ad hoc imperative redraw chains;
|
- workspace-local updates should flow through the Studio event system rather than ad hoc imperative redraw chains;
|
||||||
- future workspaces should consume shared Studio workspace framework primitives where those primitives already cover the needed behavior.
|
- future workspaces should consume shared Studio workspace framework primitives where those primitives already cover the needed behavior.
|
||||||
|
- shell and workspace code must not resolve application services through a static container or Spring application-context lookup.
|
||||||
|
|
||||||
The shell must not encourage a workspace model where every interaction falls back to whole-workspace refresh.
|
The shell must not encourage a workspace model where every interaction falls back to whole-workspace refresh.
|
||||||
|
|
||||||
@@ -137,3 +142,23 @@ This specification is complete enough when:
|
|||||||
- workspace and shell responsibilities are clearly separated;
|
- workspace and shell responsibilities are clearly separated;
|
||||||
- the shell-level expectations for workspace architecture are explicit;
|
- the shell-level expectations for workspace architecture are explicit;
|
||||||
- the baseline Studio frame is stable enough for implementation planning.
|
- the baseline Studio frame is stable enough for implementation planning.
|
||||||
|
|
||||||
|
## Project Assistant Preparation (DEC-0061)
|
||||||
|
|
||||||
|
Project creation MUST scaffold neutral agent-integration intent in
|
||||||
|
`.studio/setup.json` and invoke the same preparation port used by existing
|
||||||
|
projects in DEV. Application infrastructure resolves installed Studio and client
|
||||||
|
configuration; the wizard/Core MUST NOT serialize provider TOML or launch an
|
||||||
|
agent. Failed preparation leaves a usable project with actionable incomplete
|
||||||
|
readiness in DEV, never a false ready claim. Runtime/editor settings and unrelated
|
||||||
|
client configuration MUST survive. Preparation grants no project control.
|
||||||
|
|
||||||
|
### Automatic preparation when opening a project
|
||||||
|
|
||||||
|
Opening a project MUST prepare its enabled MCP integration using the same neutral
|
||||||
|
port as scaffold and DEV retry. Desktop composition MUST start the shared loopback
|
||||||
|
server before project sessions become available; no external command or separate
|
||||||
|
per-project desktop Run is required. Explicitly disabled integration MUST remain
|
||||||
|
disabled. Preparation failure MUST remain visible in DEV readiness without blocking
|
||||||
|
project use. Opening MUST NOT publish credentials or grant/acquire agent control.
|
||||||
|
The coding client continues to own its configured stdio process and initial trust.
|
||||||
|
|||||||
@@ -0,0 +1,401 @@
|
|||||||
|
# DEV and Automation Specification
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Active normative baseline; implementation is delivered in ordered phases.
|
||||||
|
This status does not claim that the DEV workspace, MCP endpoint or integrated
|
||||||
|
agent loop is already available in an installed Studio.
|
||||||
|
|
||||||
|
## Scope and Ownership
|
||||||
|
|
||||||
|
Owner: **studio**, including neutral API/Core services, the JavaFX DEV workspace
|
||||||
|
and application/infrastructure adapters. Runtime owns execution and its external
|
||||||
|
headless protocol. Compiler, language/SDK references, LSP and Packer retain their
|
||||||
|
existing domain ownership.
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Allow a developer to grant control of an open project to an external coding
|
||||||
|
agent, observe managed operations and canonical runtime images, and explicitly
|
||||||
|
reclaim control. Studio provides specialized project services through MCP, not
|
||||||
|
an embedded agent or a second editor.
|
||||||
|
|
||||||
|
## Authority and Normative Inputs
|
||||||
|
|
||||||
|
This specification implements accepted **DEC-0060**, including D1–D7 and B1–B9.
|
||||||
|
PLN-0139 sequences its implementation; it does not redefine this contract.
|
||||||
|
|
||||||
|
- [Core and Adapter Architecture](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md): dependency direction, composition and shared operations.
|
||||||
|
- [Shell and Workspace Layout](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md): workspace mounting and project lifetime.
|
||||||
|
- [Project-Local State](8.%20Project-Local%20Studio%20State%20Specification.md): configuration and restoration exclusions.
|
||||||
|
- [Runtime Headless Automation Protocol](../../../../runtime/docs/specs/runtime/11a-headless-automation-protocol.md): runtime-owned wire, commands, framing, limits and execution meanings.
|
||||||
|
|
||||||
|
MUST, MUST NOT and MAY express requirements, prohibitions and permissions.
|
||||||
|
Implementation MUST NOT weaken this accepted baseline; substantive ambiguity
|
||||||
|
requires explicit decision review rather than a guessed implementation rule.
|
||||||
|
|
||||||
|
## 1. Shared Services and Protocol Boundaries
|
||||||
|
|
||||||
|
JavaFX and MCP MUST consume the same neutral API/Core authority, sessions,
|
||||||
|
operations and orchestration. Neither adapter MAY simulate UI actions or
|
||||||
|
implement a parallel permission/build/pack/execution system.
|
||||||
|
|
||||||
|
| Boundary | Owner and responsibility |
|
||||||
|
| --- | --- |
|
||||||
|
| Studio API | Plain-Java contracts, identities, snapshots, typed outcomes, diagnostics and ports; no toolkit, framework or concrete wire DTOs |
|
||||||
|
| Studio Core | Project/session authority, guards, operations, build/pack/runtime coordination and ordered cleanup; testable without JavaFX or Spring |
|
||||||
|
| JavaFX DEV | Human grant/reclaim actions, presentation, localization, canvas, subscriptions and FX-thread projection |
|
||||||
|
| Application/infrastructure | MCP HTTP transport, process supervision, runtime JSONL translation, existing project LSP client, lifecycle and packaging |
|
||||||
|
| Runtime | Firmware/VM execution, input sampling, logical frames, ticks, rendering, watchdogs and faults |
|
||||||
|
| External coding client | Agent/chat, model/provider credentials, native file editing, budget, iterations and simple task stopping criteria |
|
||||||
|
|
||||||
|
MCP Streamable HTTP, runtime JSONL/stdio, and human Debug/DevTools MUST remain
|
||||||
|
distinct protocols with distinct lifecycles. A native Rust/Java binding is not
|
||||||
|
the chosen runtime boundary. Compiler, LSP, Packer and runtime semantics MUST
|
||||||
|
NOT be reimplemented in Studio.
|
||||||
|
|
||||||
|
The functional dependency graph in spec 9 MUST remain unchanged. Services
|
||||||
|
requiring guards MUST receive shared authority through neutral contracts and
|
||||||
|
composition, not depend on concrete session implementations or UI state.
|
||||||
|
|
||||||
|
## 2. Project Authority and Control States
|
||||||
|
|
||||||
|
Authority MUST belong to an open project session, not a tab, focused window,
|
||||||
|
HTTP connection or UI component. The agent MUST supply a project root; Studio
|
||||||
|
MUST validate it against an open project and use explicit project identity.
|
||||||
|
Window focus MUST NOT implicitly select a call's target.
|
||||||
|
|
||||||
|
Connection authentication, human project grant and task control identity MUST
|
||||||
|
be separate checks. At most one task MAY own a project's grant. Acquisition
|
||||||
|
without a prior human grant MUST fail. A task identity MUST be required for
|
||||||
|
authorized work and MUST NOT be reusable for another project or revoked task.
|
||||||
|
|
||||||
|
| State | Admission and permitted behavior | Exit |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Manual control | Human editing/Debug; grant only with no active Debug or conflicting managed work, and successful document handoff | Human grant enters waiting |
|
||||||
|
| Waiting for agent | Grant already blocks conflicting manual work; authenticated agent can acquire; human can reclaim without an agent connection | Acquisition enters working; reclaim enters returning |
|
||||||
|
| Agent working | One acquired task uses its valid identity; developer can inspect, navigate and reclaim | Explicit task release or human revoke enters returning |
|
||||||
|
| Returning control | Prior authority is invalid; stop managed work and refresh documents; manual conflicting actions remain blocked | Manual control only after cleanup/handoff |
|
||||||
|
|
||||||
|
Grant and acquisition MUST be enforced atomically with conflicting operation
|
||||||
|
admission. Concurrent acquisition MUST NOT create two owners. Project-local
|
||||||
|
authority MUST NOT become a global Studio lock.
|
||||||
|
|
||||||
|
Human Debug active MUST prevent grant. From grant onward, including waiting
|
||||||
|
and silence, Studio MUST prevent manual editing, Debug, build and other
|
||||||
|
conflicting project mutation. Guards MUST apply at service entry points as
|
||||||
|
well as UI bindings. Navigation, inspection and monitoring remain available.
|
||||||
|
|
||||||
|
An operation finishing, failing compilation, raising a guest fault or losing
|
||||||
|
its runtime session MUST NOT release task authority. Silence, client
|
||||||
|
disconnection and waiting MUST NOT cause expiration or automatic resumption.
|
||||||
|
There is no heartbeat or silence timeout in this baseline.
|
||||||
|
|
||||||
|
## 3. Grant and Saved-Document Handoff
|
||||||
|
|
||||||
|
Grant MUST cover Studio-owned unsaved buffers/drafts, including dirty asset
|
||||||
|
editing surfaces; it MUST NOT assume that source files are the only editable
|
||||||
|
project content.
|
||||||
|
|
||||||
|
If such content is dirty, DEV MUST offer **Save all and grant** or **Cancel**.
|
||||||
|
Grant MUST follow successful saves; user cancellation or save failure MUST NOT
|
||||||
|
cede control. Clean projects do not require a code snapshot, clean Git tree or
|
||||||
|
commit. Document participants MUST use neutral handoff contracts without moving
|
||||||
|
presentation buffers or JavaFX types into Core.
|
||||||
|
|
||||||
|
The agent edits the actual project folder with native external tools. Build
|
||||||
|
MUST use saved files, and the existing project LSP client MUST synchronize
|
||||||
|
saved content before semantic queries. Studio MUST NOT claim to save external
|
||||||
|
unsaved buffers or protect against concurrent external writes.
|
||||||
|
|
||||||
|
On authority return, Studio MUST refresh open documents from disk and MUST NOT
|
||||||
|
reapply stale buffers over agent changes. Revocation/cancellation MUST preserve
|
||||||
|
edits already made. There is no later Apply/merge step or Studio-owned code
|
||||||
|
rollback. Review, integrity, Git commits and recovery remain developer duties.
|
||||||
|
|
||||||
|
SDK/external libraries MUST be consultable but MUST NOT be edited by the
|
||||||
|
game-authoring task. Editable local libraries MUST be inside project scope.
|
||||||
|
Unsupported capabilities or required SDK changes MUST be reported as limitations,
|
||||||
|
not silently implemented outside that scope. This does not prohibit the runtime
|
||||||
|
engineering delivery that prepared this integration.
|
||||||
|
|
||||||
|
## 4. Return, Revocation and Closure
|
||||||
|
|
||||||
|
Explicit release and human reclaim MUST follow this order:
|
||||||
|
|
||||||
|
1. Invalidate task authority and reject new or delayed calls under the old identity.
|
||||||
|
2. Cancel/stop managed work and shut down owned runtime processes.
|
||||||
|
3. Refresh open documents from saved project content, without stale writeback.
|
||||||
|
4. Release conflicting manual operations and present manual control.
|
||||||
|
|
||||||
|
Late completions MUST NOT resurrect a revoked task or restore its authority.
|
||||||
|
Cleanup MUST NOT advertise manual control before managed work is stopped and
|
||||||
|
document refresh is complete. Diagnostics MUST distinguish cleanup failure from
|
||||||
|
a successful return; operation outcome and authorization state are not the same.
|
||||||
|
|
||||||
|
Reclaim MUST also work while waiting for an agent or after an operation failure.
|
||||||
|
Another task MUST require a new human grant. Closing/hiding/switching DEV MUST
|
||||||
|
NOT release control. Closing the project or Studio MUST revoke authority and
|
||||||
|
stop managed processes before teardown of their providers/executors. Reopening
|
||||||
|
MUST start in manual control, even when restoring DEV as the selected workspace.
|
||||||
|
|
||||||
|
The application-owned project-session factory tracks sessions and closes all of
|
||||||
|
them before its LSP/executor dependencies are destroyed, including sessions not
|
||||||
|
currently represented by a window. Closing one project removes it from that set;
|
||||||
|
application teardown rejects new opens and attempts every remaining project even
|
||||||
|
if another close reports failure.
|
||||||
|
|
||||||
|
If shutdown required forced termination, the first return attempt reports cleanup
|
||||||
|
failure and retains the manual guard. A subsequent explicit human reclaim may
|
||||||
|
acknowledge cleanup only after the gateway confirms that its owned process tree
|
||||||
|
is dead. A cached failed shutdown must not make a dead session permanently
|
||||||
|
unreclaimable. Cancellation racing a process crash must still allow the owner to
|
||||||
|
await worker termination and shutdown; it must not bypass that cleanup sequence.
|
||||||
|
|
||||||
|
Studio cannot stop direct writes by the external coding client. The UI and
|
||||||
|
connection instructions MUST tell the developer to stop that client separately;
|
||||||
|
reclaim is not an operating-system filesystem lock or a rollback guarantee.
|
||||||
|
|
||||||
|
## 5. DEV Workspace Contract
|
||||||
|
|
||||||
|
DEV MUST expose:
|
||||||
|
|
||||||
|
- **Grant control to AI** (`Ceder controle à IA`) and **Interrupt and reclaim control** (`Interromper e retomar controle`);
|
||||||
|
- the four control states, project identity, current managed operation and diagnostics;
|
||||||
|
- a canonical-image canvas with session/build/logical-frame/render-frame identity and stale status;
|
||||||
|
- a short history of Studio calls, not an independent code history;
|
||||||
|
- **Prepare assistant**, plus short connection/use instructions when the real MCP composition is available.
|
||||||
|
|
||||||
|
Actions MUST reflect shared service authority. DEV MUST NOT own a duplicate
|
||||||
|
lock or release authority when disposing visual subscriptions. Presentation
|
||||||
|
updates MUST follow the existing FX-thread, theme, localization and workspace
|
||||||
|
lifecycle rules.
|
||||||
|
|
||||||
|
DEV MUST NOT contain chat, provider settings, manual headless Play/input or
|
||||||
|
concurrent human control of the agent's execution. Human play/testing remains
|
||||||
|
in Debug with its existing host/protocol/lifecycle, subject to symmetric guards.
|
||||||
|
“Agent working” means the task has been acquired; it is not a claim to observe
|
||||||
|
all external edits, reasoning or conversation.
|
||||||
|
|
||||||
|
Preparation MUST report missing installation or configuration conflicts explicitly; it does not depend on a live grant or fabricate endpoint credentials. Test doubles MAY supply
|
||||||
|
operations/captures to isolated tests, never masquerade as product execution.
|
||||||
|
|
||||||
|
## 6. Operations and Lost Responses
|
||||||
|
|
||||||
|
Automation MUST reuse the neutral operation executor/handle boundary: stable
|
||||||
|
operation identity, observable snapshots/progress, cancellation, asynchronous
|
||||||
|
completion and typed results. Build/pack diagnostics MUST be preserved.
|
||||||
|
Success, lifecycle termination, guest fault, infrastructure/host failure and
|
||||||
|
cancellation MUST remain distinguishable, including known partial progress.
|
||||||
|
|
||||||
|
Build and advance starts MUST return `operationId` promptly. Each start MUST
|
||||||
|
accept `clientRequestId` and allow authorized lookup by that identity if the
|
||||||
|
initial response is lost. Within the task:
|
||||||
|
|
||||||
|
- same identifier and same parameters MUST return the existing operation without reexecution;
|
||||||
|
- same identifier with different parameters MUST fail;
|
||||||
|
- deduplication and lookup MUST still validate project/task authority;
|
||||||
|
- the registry MUST stay in memory only, without restart recovery or replay.
|
||||||
|
|
||||||
|
Runtime `requestId` correlates a wire call; it is not Studio operation
|
||||||
|
deduplication. Neither transport error nor lost response authorizes blindly
|
||||||
|
retrying an advance. A runtime crash requires an explicit new session, not
|
||||||
|
restoration/replay; task authority remains governed by section 2.
|
||||||
|
|
||||||
|
## 7. Runtime Supervision and Canonical Capture
|
||||||
|
|
||||||
|
Studio MUST resolve `prometeu headless --stdio` from the configured runtime
|
||||||
|
installation. It MUST NOT discover/download another runtime over the network.
|
||||||
|
Missing or incompatible installations MUST fail explicitly. Each process owns
|
||||||
|
one session; each task MUST have at most one active headless session.
|
||||||
|
|
||||||
|
The gateway MUST validate the runtime's protocol major/minor, real version,
|
||||||
|
required capabilities and effective limits. Incompatible major or missing
|
||||||
|
mandatory capability MUST block the session; compatible minor additions are
|
||||||
|
permitted. It MUST obey complete UTF-8 JSONL framing and separate protocol
|
||||||
|
stdout from stderr diagnostics. Invalid input/schema MUST not disappear silently.
|
||||||
|
|
||||||
|
The application adapter resolves the executable from `ProjectLocalStudioSetup`,
|
||||||
|
launches it without a shell in the project root, and passes all six effective
|
||||||
|
limits explicitly. Hello and initialize share one handshake deadline. Required
|
||||||
|
hello limits must match the launch configuration; request IDs and session IDs
|
||||||
|
are checked on every subsequent response. Partial lines, invalid UTF-8,
|
||||||
|
duplicate JSON keys, uncorrelated replies and non-monotonic progress invalidate
|
||||||
|
the process. Stderr is drained independently into bounded diagnostics.
|
||||||
|
|
||||||
|
The runtime-owned surface covers boot/reset, set/clear normalized input,
|
||||||
|
advance, capture, state/fault, cancel and shutdown. Conflicting execution work
|
||||||
|
MUST NOT execute concurrently or be silently queued. Advance MUST preserve
|
||||||
|
requested/completed counts and stop reasons. Cancellation is observed between
|
||||||
|
frames; the current frame retains its deterministic watchdog, not a wall-clock
|
||||||
|
guest deadline. No background realtime game loop is introduced for automation.
|
||||||
|
|
||||||
|
Reset leaves the runtime unbooted and clears its capture. It does not implicitly
|
||||||
|
boot the cartridge again. A subsequent explicit boot may reuse the session's
|
||||||
|
known build cartridge; an invalidated process requires an explicit new session.
|
||||||
|
|
||||||
|
| Configurable, handshake-advertised limit | Default |
|
||||||
|
| --- | --- |
|
||||||
|
| Frames per advance | 600 |
|
||||||
|
| Command message | 64 KiB |
|
||||||
|
| Complete response including image/envelope | 32 MiB |
|
||||||
|
| Handshake wait | 5 s |
|
||||||
|
| Headless-call timeout | 60 s |
|
||||||
|
| Cancel/shutdown grace before process termination | 5 s |
|
||||||
|
|
||||||
|
Oversized requests MUST fail, not be silently clamped. Responses MUST respect
|
||||||
|
their complete serialized limit. Studio MUST supervise external-process
|
||||||
|
deadlines and terminate only its owned process tree if cancellation/shutdown
|
||||||
|
does not respond within the configured grace. Report infrastructure failure
|
||||||
|
and only known progress. EOF closes the headless process; it never resumes it.
|
||||||
|
|
||||||
|
Screenshot means the runtime's canonical **RGBA8888 framebuffer bitmap**.
|
||||||
|
Capture MUST use lossless PNG/base64 with dimensions, original stride/layout,
|
||||||
|
runtime session, `logical_frame_index` and `FrameId`. These two frame identities
|
||||||
|
MUST NOT be assumed numerically equal. Studio MUST attach build correlation.
|
||||||
|
Both identities retain the full unsigned 64-bit range: Java uses `BigInteger`,
|
||||||
|
and MCP serializes integer JSON values without conversion through floating point.
|
||||||
|
Hashes MAY supplement but MUST NOT replace pixels. No desktop/window screenshot,
|
||||||
|
temporary-image-file transport or continuous video is permitted.
|
||||||
|
|
||||||
|
The adapter validates base64, PNG signature, RGBA8 header, dimensions and decoded
|
||||||
|
image consistency in memory, then forwards the original PNG bytes unchanged.
|
||||||
|
Its decoder currently guards allocations at 16,777,216 pixels; exceeding this
|
||||||
|
bound fails explicitly rather than resizing or substituting the image.
|
||||||
|
|
||||||
|
Agent and DEV MUST receive the same capture and correlation for requested
|
||||||
|
advances. DEV MUST identify images from an older build/session as stale during
|
||||||
|
edits/rebuilds. The previous execution MUST stop before rebuilding artifacts
|
||||||
|
that it uses. Capture/build correlation MUST NOT introduce code snapshots.
|
||||||
|
|
||||||
|
## 8. Local MCP Admission and Functional Surface
|
||||||
|
|
||||||
|
Concrete tool names, input schemas, response envelopes and HTTP lifecycle are
|
||||||
|
specified in [MCP Tools and Project Knowledge Contract](11.%20MCP%20Tools%20and%20Project%20Knowledge%20Contract.md).
|
||||||
|
|
||||||
|
The desktop MUST host Streamable HTTP at `127.0.0.1:<OS-assigned-port>/mcp`.
|
||||||
|
DEC-0061 adds Studio-owned stdio discovery and one-time preparation as specified
|
||||||
|
in spec 11. Each human grant publishes a fresh project-scoped credential through
|
||||||
|
the required lifecycle participant in spec 8. Authentication, project scope and
|
||||||
|
task identity remain separate checks. There is no global credential bypass.
|
||||||
|
Restart invalidates old access and requires a fresh human grant, while the native
|
||||||
|
client's command/configuration remains unchanged. No remote binding, accounts or
|
||||||
|
OAuth are introduced. Preparation never grants editing authority.
|
||||||
|
|
||||||
|
| Tool group | Required capabilities | Required authority |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Context/references | Project identity, languages, versions, capabilities and paginated references | Project credential; no acquired task required |
|
||||||
|
| Control | Acquire task and release control | Prior human grant for acquisition; valid task identity for release |
|
||||||
|
| Language | Existing LSP diagnostics/navigation and supported capabilities | Valid project/task identity |
|
||||||
|
| Build | Compile and pack | Valid project/task identity |
|
||||||
|
| Headless | Boot/reset, input, advance, capture, state/fault and shutdown | Valid project/task identity |
|
||||||
|
| Operations | Query, lookup by client request identity and cancel | Valid project/task identity |
|
||||||
|
|
||||||
|
MCP capture responses MUST expose image content plus structured metadata;
|
||||||
|
clients MUST NOT need to parse logs or fetch a temporary file to obtain pixels.
|
||||||
|
Generic shell, generic file editing, Git, publication and out-of-project changes
|
||||||
|
MUST NOT be exposed as shortcuts around these specialized services. Studio
|
||||||
|
grant does not override the external client's own permission policy or require
|
||||||
|
a new human confirmation for every authorized Studio operation.
|
||||||
|
|
||||||
|
## 9. Project Language Context and References
|
||||||
|
|
||||||
|
The project manifest MUST be authoritative for primary language and dependencies;
|
||||||
|
there is no parallel AI-only language configuration. PBS is the project-creation
|
||||||
|
default, not a fallback for an unknown declared language. Installed compiler/LSP
|
||||||
|
integrations MUST advertise their actual capabilities; unknown versions or
|
||||||
|
capabilities MUST be reported as unknown, not invented.
|
||||||
|
|
||||||
|
Context MUST include:
|
||||||
|
|
||||||
|
- explicit project identity/root;
|
||||||
|
- language list and primary designation, with separately identified known language/compiler/SDK versions;
|
||||||
|
- source extensions/scope and actual LSP/build capabilities;
|
||||||
|
- references, examples, libraries and editable versus read-only roots.
|
||||||
|
|
||||||
|
A one-entry PBS list is valid; extensibility does not require another language
|
||||||
|
or a multilingual compiler. LSP MUST use the existing project server and support
|
||||||
|
project/library navigation through the diagnostics, definitions, references,
|
||||||
|
symbols and other queries/refactorings it actually supports. It MUST NOT
|
||||||
|
advertise nonexistent features or apply edits outside authorized scope.
|
||||||
|
|
||||||
|
The matching language/SDK distribution MUST ship indexed local quickstart,
|
||||||
|
syntax, semantics, examples and SDK reference material. Consultation MUST work
|
||||||
|
without Studio/compiler checkouts. MCP MUST read references by identifier with
|
||||||
|
pagination, not arbitrary paths. Documentation ownership remains with its
|
||||||
|
language/SDK/library owner; packaging does not create parallel language semantics.
|
||||||
|
|
||||||
|
Connection guidance MUST describe: connect → consult current project/languages/
|
||||||
|
references → acquire after human grant → work using saved files and validate
|
||||||
|
through LSP/build → release. The agent need not know PBS in advance. Missing
|
||||||
|
documentation or unsupported language MUST appear as explicit limitations;
|
||||||
|
static copied instructions MUST NOT substitute for current project context.
|
||||||
|
|
||||||
|
## 10. Delivery Phases and Conformance Gates
|
||||||
|
|
||||||
|
The accepted slicing is runtime → DEV/shared services → MCP → integration.
|
||||||
|
No intermediate phase constitutes complete delivery of this specification.
|
||||||
|
|
||||||
|
| Phase / plan steps | Required gate and limit |
|
||||||
|
| --- | --- |
|
||||||
|
| Runtime, 01–07 | Independent process client proves external contract, deterministic execution, canonical pixels, limits/failures and installed CLI; no Studio/AI dependency |
|
||||||
|
| DEV/shared services, 08–14 | Neutral authority/operations and document handoff first, then DEV; test grant/reclaim, Debug exclusion, dirty buffers, revocation/closure, late calls and FX lifecycle; desktop navigation smoke; doubles only in tests, no fake product endpoint |
|
||||||
|
| MCP, 15–21 | Automated MCP client proves authenticated discovery, real configuration, unauthorized rejection, exclusive acquisition, context/references, operations/deduplication, revocation and image contracts; no model required for this gate |
|
||||||
|
| Integration, 22–28 | Real runtime/LSP/build and an external coding client prove edit → build/pack → boot/input/advance → matching agent/DEV image → release; corrective loops and cleanup preserve manual Debug |
|
||||||
|
|
||||||
|
Cross-phase conformance MUST prove API/Core neutrality, the unchanged Modulith
|
||||||
|
dependency graph, application startup/shutdown, installed/offline references,
|
||||||
|
packaging and desktop behavior. Real-client tool/image compatibility MUST be
|
||||||
|
verified with the selected client, not promised uniformly across providers.
|
||||||
|
The vertical slice MAY use a simple existing PBS program; a complete game or
|
||||||
|
mature gameplay library is not a prerequisite.
|
||||||
|
|
||||||
|
### Decision Traceability
|
||||||
|
|
||||||
|
| Accepted requirement | Normative location |
|
||||||
|
| --- | --- |
|
||||||
|
| D1 architecture | Section 1 and spec 9 |
|
||||||
|
| D2 runtime; B1–B3 entry/wire/order | Sections 6–7 and runtime-owned protocol |
|
||||||
|
| D3 capture; B4 capture/limits | Sections 5 and 7 |
|
||||||
|
| D4 DEV/authority | Sections 2–5; shell spec and state-restoration exclusions |
|
||||||
|
| D5 files/LSP/write scope | Sections 3 and 9 |
|
||||||
|
| D6 MCP/operations; B5–B7 | Sections 6 and 8; spec 9's HTTP exception |
|
||||||
|
| D7 languages/onboarding; B8–B9 | Sections 8–9 |
|
||||||
|
| Ordered slicing and acceptance | Section 10 |
|
||||||
|
| Accepted exclusions | Section 11 |
|
||||||
|
|
||||||
|
## 11. Non-Goals
|
||||||
|
|
||||||
|
- Embedded agent, chat, provider adapter, provider credentials or cost/budget accounting.
|
||||||
|
- Mirroring external conversation, reasoning or all filesystem activity.
|
||||||
|
- Pixel-art generation, full-game libraries, audio capture or deep guest introspection.
|
||||||
|
- Shared editing, isolated worktrees, code snapshots/journals/checkpoints, merge/apply, divergence recovery, undo/rollback or automatic commits/clean-tree gates.
|
||||||
|
- Replacing compiler, Packer, LSP, VM or human Debug semantics; a new general-purpose Studio source editor.
|
||||||
|
- Remote MCP, accounts/OAuth and network runtime discovery. Studio-owned stdio and local Codex preparation are the explicit DEC-0061 additions.
|
||||||
|
- Additional language implementation, persistent operation recovery or automatic task resumption.
|
||||||
|
- Integrated discussion-framework agendas/decisions/plans in the product; those are future work, not this runtime/DEV/MCP contract.
|
||||||
|
|
||||||
|
## Exit Criteria
|
||||||
|
|
||||||
|
Implementation is conformant only when all phase gates hold and:
|
||||||
|
|
||||||
|
1. Human grant, task acquisition, operation outcome and authority return are distinct and tested.
|
||||||
|
2. Service-level guards prevent conflicting manual work from grant through cleanup without blocking read-only navigation globally.
|
||||||
|
3. Save failure prevents grant; successful return refreshes documents without overwriting agent edits.
|
||||||
|
4. Revoke invalidates old calls first, works while waiting and preserves edits; project/application closure cleans owned processes and never restores authority.
|
||||||
|
5. DEV and the agent see the same canonical image with explicit build/session/frame correlation and stale labeling.
|
||||||
|
6. Local transport authentication does not bypass project/task authorization or scope restrictions.
|
||||||
|
7. Lost operation responses cannot duplicate execution; runtime crash cannot trigger replay or implicit authority release.
|
||||||
|
8. Language context and indexed local references reflect real installed support and work without source checkouts.
|
||||||
|
9. Manual Debug, architecture boundaries, packaging and real-client integration pass their regression gates.
|
||||||
|
|
||||||
|
## Integrated Connection Revision (DEC-0061)
|
||||||
|
|
||||||
|
Connection and authority MUST be displayed separately. Initialization/ping
|
||||||
|
liveness determines connection, while Core determines waiting/working/manual
|
||||||
|
control. A missing descriptor means waiting for access, not proof that Studio is
|
||||||
|
closed. Preparation reports initial client trust/reload requirements without
|
||||||
|
modifying approval policy. Revocation removes published access even before
|
||||||
|
asynchronous worker/runtime cleanup finishes. New grants never restore old task
|
||||||
|
IDs or receipts. Full integrated native-client acceptance belongs to PLN-0140;
|
||||||
|
the prior HTTP acceptance alone is insufficient.
|
||||||
@@ -0,0 +1,576 @@
|
|||||||
|
# MCP Tools and Project Knowledge Contract
|
||||||
|
|
||||||
|
## Status, Scope and Authority
|
||||||
|
|
||||||
|
Owner: **studio**, application adapter and neutral automation API. This document
|
||||||
|
formalizes DEC-0060 B5–B9 and the integrated connection revision in DEC-0061 (PLN-0140). It complements
|
||||||
|
[DEV and Automation](10.%20DEV%20and%20Automation%20Specification.md), which owns
|
||||||
|
project authority, lifecycle, captures and phase gates. It does not change those
|
||||||
|
rules or the runtime-owned headless protocol.
|
||||||
|
|
||||||
|
The packaged machine-readable input schemas, authority classification and
|
||||||
|
examples are in `prometeu-app/src/main/resources/mcp/studio-tools-v1.json`.
|
||||||
|
Contract version is `1.0`. Catalog membership is not runtime availability:
|
||||||
|
HTTP `tools/list` MUST expose only composed handlers, never placeholder implementations. The offline Studio stdio entry MUST advertise the packaged catalog and report unavailable live capabilities explicitly.
|
||||||
|
Steps 17–21 connect the functional providers and DEV configuration assistance;
|
||||||
|
steps 22–28 provide the real runtime gateway and integrated acceptance.
|
||||||
|
|
||||||
|
## 1. Connection Contract
|
||||||
|
|
||||||
|
The app hosts `/mcp` on **127.0.0.1 with an OS-assigned port**, using the JSON
|
||||||
|
response form of MCP Streamable HTTP, protocol revision `2025-06-18`. The
|
||||||
|
initialization exchange negotiates that supported revision; no compatibility
|
||||||
|
with other revisions or deprecated HTTP+SSE transport is claimed. An offered
|
||||||
|
unsupported revision receives the supported revision in `InitializeResult`.
|
||||||
|
|
||||||
|
Each desktop start generates a new instance identity. Each human project grant
|
||||||
|
publishes a fresh 256-bit bearer credential scoped to that canonical project root.
|
||||||
|
Every HTTP request MUST include `Authorization: Bearer <credential>`; missing,
|
||||||
|
wrong or revoked credentials return 401. Initialized HTTP sessions MUST be bound
|
||||||
|
to that credential/root; mixing another credential with an existing session returns
|
||||||
|
403. All tools, including knowledge reads, MUST enforce the authenticated root
|
||||||
|
before dispatch. No instance-wide credential bypass is permitted.
|
||||||
|
|
||||||
|
There is no query-string token, OAuth, cookie authentication, remote bind option
|
||||||
|
or wildcard listener. The endpoint has no query parameters. Studio also provides
|
||||||
|
its own stdio mode, described below; it is part of the same artifact.
|
||||||
|
|
||||||
|
Native clients may omit `Origin`. If present, it MUST exactly equal the live
|
||||||
|
endpoint's origin (`http://127.0.0.1:<port>`); `null`, other ports/hosts/schemes
|
||||||
|
and multiple Origin headers fail. Host MUST match the live loopback authority.
|
||||||
|
Unexpected origins/hosts return 403. No permissive browser CORS policy is emitted.
|
||||||
|
Credentials MUST NOT appear in diagnostics, exception messages, object string
|
||||||
|
representations, generated reports or versioned configuration. The project discovery file is the only secret-bearing setup output; persistent client configuration and clipboard assistance MUST NOT export secrets.
|
||||||
|
|
||||||
|
Initialization assigns a separate random `Mcp-Session-Id`. Subsequent requests
|
||||||
|
include this header and the negotiated `MCP-Protocol-Version`. The server can
|
||||||
|
recover the negotiated version from its connection session if the version header
|
||||||
|
is absent; an explicitly unsupported header returns 400. Missing required
|
||||||
|
session returns 400; an unknown/closed session returns 404. The client sends
|
||||||
|
`notifications/initialized` before tools. `ping` is available after initialization.
|
||||||
|
|
||||||
|
POST requires UTF-8 JSON and Accept support for `application/json` and
|
||||||
|
`text/event-stream`. Responses use JSON, not SSE. GET returns 405. DELETE closes
|
||||||
|
only the connection session, not project authority. Accepted notifications and
|
||||||
|
client responses return 202 without a body. Notification/disconnection alone
|
||||||
|
MUST NOT revoke a task or cancel an operation already returned by operationId.
|
||||||
|
|
||||||
|
The transport bounds incoming bodies to 1 MiB, sessions to 128 and request
|
||||||
|
handling to a bounded worker queue. Oversized bodies return 413; exhausted
|
||||||
|
session capacity returns 503. Stalled exchanges close after 15 seconds. These
|
||||||
|
are HTTP resource protections, **not** task expiration or guest/runtime timeouts.
|
||||||
|
Build/advance MUST return operation identities promptly. A lost response is
|
||||||
|
resolved by authorized lookup, not by assuming cancellation or replay.
|
||||||
|
|
||||||
|
These details follow the official MCP [transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports),
|
||||||
|
[lifecycle](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle)
|
||||||
|
and [tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
|
||||||
|
contracts. Optional SSE, server-initiated requests, sampling, prompts, resource
|
||||||
|
subscriptions and list-change notifications are not advertised.
|
||||||
|
|
||||||
|
### 1.1 Integrated Studio Entry and Offline Catalog
|
||||||
|
|
||||||
|
`StudioLauncher mcp --project <absolute-root>` MUST dispatch before JavaFX or
|
||||||
|
Spring desktop startup. The root MUST be canonicalized once, contain the project
|
||||||
|
manifest and remain bound for the process lifetime, independently of client cwd.
|
||||||
|
The mode MUST NOT open a desktop, LSP, runtime or another HTTP listener. It uses
|
||||||
|
newline-framed UTF-8 JSON-RPC on stdin/stdout; stdout is protocol-only. Requests
|
||||||
|
are bounded to 1 MiB. EOF closes transport resources without releasing task control.
|
||||||
|
|
||||||
|
Initialize, initialized notification, ping and tools/list MUST work before the
|
||||||
|
desktop, descriptor or grant exists. Offline descriptors come from the same
|
||||||
|
packaged catalog as HTTP. A deterministic fingerprint covers protocol and tool
|
||||||
|
schemas. Before forwarding, the connector MUST validate the descriptor, initialize
|
||||||
|
HTTP, check instance/root/fingerprint metadata, and compare live descriptors with
|
||||||
|
the packaged catalog. Missing handlers return unsupported capability; incompatible
|
||||||
|
protocol/schema fails explicitly rather than silently changing the client's tools.
|
||||||
|
|
||||||
|
Tool calls MUST preserve structuredContent, text/error blocks and native image
|
||||||
|
blocks. Response bounds MUST support images above the 1 MiB request limit; the
|
||||||
|
current response cap is 32 MiB, including a bounded body-read deadline. Network
|
||||||
|
redirects MUST NOT be followed. The connector MUST reject another project root.
|
||||||
|
|
||||||
|
Discovery runs on calls and bounded background checks. Missing publication means
|
||||||
|
waiting for access, not proof that the desktop is closed. Distinguish invalid
|
||||||
|
file/permissions, stale credentials/instance, catalog incompatibility and transport
|
||||||
|
reconnection. Calls cannot wait indefinitely for a grant. No reconnect path may
|
||||||
|
resubmit a tool call. An uncertain response MUST retain available clientRequestId
|
||||||
|
correlation and instruct receipt lookup within the same authorized task. A new
|
||||||
|
desktop/task has no old receipt registry and requires a fresh human grant.
|
||||||
|
|
||||||
|
### 1.2 Stable Installation and Project Preparation
|
||||||
|
|
||||||
|
The initial delivery targets Codex on macOS. Studio owns a versioned installation
|
||||||
|
under `~/Library/Application Support/Prometeu/Studio`, with an atomic `current`
|
||||||
|
reference. Each version includes `lib` dependencies and a compatible Java runtime
|
||||||
|
under `runtime`. Validate a staged version before switching `current`; retain
|
||||||
|
previous versions for rollback and already-running processes. Failed validation
|
||||||
|
MUST leave the existing reference intact. Registered commands MUST work without
|
||||||
|
an interactive shell PATH, external JDK or developer checkout.
|
||||||
|
|
||||||
|
The client command is the absolute `current/runtime/bin/java`, with argument-array
|
||||||
|
values `-cp`, `<current>/lib/*`, `p.studio.app.StudioLauncher`, `mcp`, `--project`,
|
||||||
|
and the canonical root. No project-local executable, generated transport script,
|
||||||
|
helper binary or separate launcher installation is allowed. The desktop and
|
||||||
|
connector use the same Studio artifact. JDWP is an explicit development-only JVM
|
||||||
|
option; IntelliJ attaches to the client-owned connector process separately from
|
||||||
|
the desktop Debug configuration.
|
||||||
|
|
||||||
|
New-project scaffolding and existing-project preparation MUST use the same neutral
|
||||||
|
preparation port. `.studio/setup.json` stores integration schema/enabled/profile
|
||||||
|
intent, preserving runtime/editor settings; it contains no endpoint/credential/task.
|
||||||
|
Application infrastructure owns `.codex/config.toml` serialization. Its managed
|
||||||
|
`mcp_servers.prometeu_studio` table stores the stable command, arguments, project
|
||||||
|
cwd and cold-start timeout. Preserve all unrelated tables, comments, approval
|
||||||
|
policy and server entries byte-for-byte; validate edits with a TOML parser.
|
||||||
|
Repetition with identical values MUST be a no-op. User-owned or modified managed
|
||||||
|
entries and tracked client configuration MUST produce an actionable conflict,
|
||||||
|
never an overwrite. Keep a protected recovery copy of the previous owned block
|
||||||
|
without copying unrelated secrets. Precise ignore rules protect machine-local
|
||||||
|
client configuration and transient discovery without deleting existing rules.
|
||||||
|
|
||||||
|
Preparation MUST report incomplete writes/installations truthfully. Trust/reload
|
||||||
|
instructions apply to initial client registration only; no client trust or tool
|
||||||
|
approval may be bypassed. Grant and desktop restart MUST NOT require changing the
|
||||||
|
client configuration. A clone is prepared locally to resolve its own installation
|
||||||
|
and project paths. No global client configuration is rewritten.
|
||||||
|
|
||||||
|
### 1.3 DEV Connection Assistance
|
||||||
|
|
||||||
|
DEV MUST expose preparation/readiness through neutral API contracts and show
|
||||||
|
connection status separately from Core authority. Waiting for access, connected
|
||||||
|
and reconnecting derive from project-scoped initialization/ping activity with a
|
||||||
|
bounded liveness window; a retained HTTP session ID alone is insufficient. Working
|
||||||
|
remains an authority/operation state. DEV MUST NOT invent knowledge of a client
|
||||||
|
before it connects. A transport drop MUST NOT revoke a task or grant new control.
|
||||||
|
|
||||||
|
Preparation, labels, clipboard, diagnostics and history MUST NOT expose secrets.
|
||||||
|
Closing/hiding DEV only unsubscribes visual listeners. Human grant/reclaim and
|
||||||
|
project/application teardown retain their shared Core semantics. Instructions
|
||||||
|
cover native file edits, project knowledge, grant/acquire, validation, receipt
|
||||||
|
lookup, images and explicit release without generated transport clients.
|
||||||
|
|
||||||
|
## 2. Identity and Admission
|
||||||
|
|
||||||
|
All tool inputs require `projectRoot`: an absolute filesystem root resolving to
|
||||||
|
an open project. UI focus never supplies it. Core services resolve the actual
|
||||||
|
project, including canonical-path/scope checks; syntactic validation does not
|
||||||
|
prove authorization.
|
||||||
|
|
||||||
|
The authority levels in the packaged catalog are:
|
||||||
|
|
||||||
|
- `authenticated`: connection authentication only; project/context/reference reads
|
||||||
|
need no acquired task. HTTP access still requires the project credential published by human grant. Offline catalog discovery returns no task token.
|
||||||
|
- `granted`: acquisition validates the prior human grant and atomically creates
|
||||||
|
the sole task identity. The transport session ID is not that identity.
|
||||||
|
- `task`: `projectRoot` and `taskId` must identify the current acquired task.
|
||||||
|
Revalidate before admission, lookup and deduplication, including read-only LSP.
|
||||||
|
|
||||||
|
No MCP tool grants human permission or simulates pressing the DEV button.
|
||||||
|
There are no arbitrary-file read/write, shell, Git or publication tools. Editing
|
||||||
|
uses the external client's native tools within the context's editable scope.
|
||||||
|
|
||||||
|
## 3. v1 Tool Catalog
|
||||||
|
|
||||||
|
Fields below supplement `projectRoot`, and `taskId` where authority is `task`.
|
||||||
|
Input objects reject undeclared fields. IDs are nonempty opaque strings.
|
||||||
|
|
||||||
|
| Tool | Authority | Additional input | Successful value |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| `studio_project_context` | authenticated | none | Project context in section 5 |
|
||||||
|
| `studio_reference_read` | authenticated | referenceId; optional offset/limit | Indexed reference page |
|
||||||
|
| `studio_control_acquire` | granted | none | taskId, state=AGENT_WORKING |
|
||||||
|
| `studio_control_release` | task | none | state=MANUAL, only after ordered cleanup |
|
||||||
|
| `studio_language_query` | task | operation, parameters | Supported LSP query/proposal result |
|
||||||
|
| `studio_build_start` | task | clientRequestId | operationId, clientRequestId, state |
|
||||||
|
| `studio_headless_boot` | task | buildId | sessionId, buildId; boot uses the task's known build |
|
||||||
|
| `studio_headless_reset` | task | none | Current session/reset state |
|
||||||
|
| `studio_headless_set_input` | task | input | Current session acknowledgement |
|
||||||
|
| `studio_headless_clear_input` | task | none | Current session acknowledgement |
|
||||||
|
| `studio_headless_advance` | task | clientRequestId, frames | operationId, clientRequestId, state |
|
||||||
|
| `studio_headless_capture` | task | none | Canonical image and metadata in section 6 |
|
||||||
|
| `studio_headless_state` | task | none | Current session and runtime state |
|
||||||
|
| `studio_headless_fault` | task | none | fault object or null, preserving structural fault details |
|
||||||
|
| `studio_headless_shutdown` | task | none | Session shutdown acknowledgement after managed cleanup |
|
||||||
|
| `studio_operation_get` | task | exactly one of operationId/clientRequestId | State, known progress, typed result/failure |
|
||||||
|
| `studio_operation_cancel` | task | operationId | operationId, cancellationRequested |
|
||||||
|
|
||||||
|
Boot MUST NOT accept an arbitrary cartridge path. The shared service resolves
|
||||||
|
buildId to known project artifacts. Runtime limits/capabilities come from the
|
||||||
|
actual runtime, not fixed MCP promises. Frames is a nonnegative integer (zero
|
||||||
|
is valid); values beyond effective limits fail rather than being clamped.
|
||||||
|
|
||||||
|
Input is a replacement snapshot: booleans `up/down/left/right/a/b/x/y/l/r/start/
|
||||||
|
select/touch`, signed 32-bit `touchX/touchY`. Omitted fields reset to false/zero.
|
||||||
|
It preserves the runtime's normal sampling/edge semantics, not UI keyboard events.
|
||||||
|
|
||||||
|
Language queries use the capabilities returned by project context. Parameters
|
||||||
|
may contain URI, zero-based UTF-16 position/range/positions, workspace query,
|
||||||
|
newName, includeDeclaration or task-local itemId for multi-stage queries. The
|
||||||
|
provider MUST validate the parameters needed by the selected operation and reject
|
||||||
|
unsupported operations explicitly. Diagnostics, definitions, references and
|
||||||
|
symbols reuse the existing project LSP. Other queries/refactoring proposals are
|
||||||
|
exposed only when supported; returned edits MUST respect project versus read-only
|
||||||
|
SDK/library scope. No query applies filesystem edits.
|
||||||
|
|
||||||
|
### 3.1 Language Query Operations
|
||||||
|
|
||||||
|
`studio_language_query` uses the existing project's LSP server via a real client,
|
||||||
|
not a parallel language implementation or a direct call into compiler semantics.
|
||||||
|
Its successful value is `{operation, result, limitations}`. `result` is the JSON
|
||||||
|
projection of the existing LSP response (including null or an empty list when
|
||||||
|
appropriate); LSP union wrappers are unwrapped. Provider classes remain inside
|
||||||
|
the application adapter. Studio API/Core use maps, lists and scalar values only.
|
||||||
|
|
||||||
|
| Operation | Required parameters beyond projectRoot/taskId |
|
||||||
|
| --- | --- |
|
||||||
|
| `diagnostics`, `documentSymbols`, `documentLinks`, `foldingRanges`, `formatting`, `semanticTokens` | `parameters.uri` |
|
||||||
|
| `hover`, `completion`, `signatureHelp`, `definition`, `references`, `prepareRename`, `prepareCallHierarchy` | `uri`, `position`; references optionally accepts `includeDeclaration` |
|
||||||
|
| `rename` | `uri`, `position`, `newName` |
|
||||||
|
| `workspaceSymbols` | optional `query`; no document URI is needed |
|
||||||
|
| `selectionRanges` | `uri`, nonempty `positions` |
|
||||||
|
| `codeActions` | `uri`, ordered `range`; diagnostics are obtained from the current saved file |
|
||||||
|
| `incomingCalls`, `outgoingCalls` | task-local `itemId` from a hierarchy result |
|
||||||
|
|
||||||
|
Support MUST be checked against the running server's initialize response before
|
||||||
|
dispatch. Unknown operations, including currently unsupported type hierarchy,
|
||||||
|
return `UNSUPPORTED_CAPABILITY`. Context publishes the installed provider's
|
||||||
|
capabilities, including semantic tokens; hierarchy and rename preparations use
|
||||||
|
their corresponding server capability. Positions are zero-based UTF-16 offsets,
|
||||||
|
must fit the saved file and must not split surrogate pairs. Reversed ranges and
|
||||||
|
missing operation-specific parameters are rejected.
|
||||||
|
|
||||||
|
The application lifecycle supplies each open project's bound loopback LSP
|
||||||
|
endpoint. Studio uses OS-assigned ports so different open projects do not compete
|
||||||
|
for one fixed port. The public LSP configuration default remains unchanged for
|
||||||
|
other hosts. A manifest language change requires reopening that project's server;
|
||||||
|
the adapter MUST NOT send queries to a server bound to another language/root.
|
||||||
|
|
||||||
|
Each query uses a short-lived client connection. For document requests, the
|
||||||
|
adapter opens exactly the saved UTF-8 text and waits for that connection's
|
||||||
|
published diagnostics before issuing the semantic query. Other dependency files
|
||||||
|
are read from disk by the existing compiler bridge. A fresh connection prevents
|
||||||
|
reuse of stale overlays from previous requests or the human editor. Unsaved or
|
||||||
|
concurrent external writes remain the developer's responsibility.
|
||||||
|
|
||||||
|
Queries require the current task, share the project's work admission/cancellation
|
||||||
|
and DEV operation observation, and do not silently queue behind conflicting work.
|
||||||
|
Return/reclaim invalidates the task immediately, waits for worker termination,
|
||||||
|
then clears task-local hierarchy items before manual control is restored. Item
|
||||||
|
IDs from another task or project cannot be used. Client sockets/listeners close
|
||||||
|
on success, failure, timeout or cancellation; project-server shutdown closes its
|
||||||
|
accepted sockets and executor. A lost client does not independently grant control.
|
||||||
|
|
||||||
|
The adapter bounds connect time to 2 seconds and the LSP exchange to 10 seconds;
|
||||||
|
Core bounds the request worker wait to 12 seconds. Documents are limited to 4 MiB
|
||||||
|
of UTF-8 and task-local hierarchy state to 1024 items. These are adapter resource
|
||||||
|
guards, unrelated to the runtime's deterministic frame/watchdog semantics.
|
||||||
|
|
||||||
|
Document URIs must resolve to known physical project/dependency source files.
|
||||||
|
Symlink targets are canonicalized before admission. External sources may be
|
||||||
|
queried, but edit-producing queries on read-only roots are rejected. Every URI in
|
||||||
|
returned workspace-edit proposals is checked against the same editable/read-only
|
||||||
|
scope; an unsafe proposal is rejected as a whole. File-operation edits and
|
||||||
|
executable commands are not offered; `workspace/applyEdit` is always refused.
|
||||||
|
No query writes a file. Virtual SDK declarations may not have physical definition
|
||||||
|
locations in the existing LSP; indexed SDK references remain available instead.
|
||||||
|
|
||||||
|
## 4. Result, Error and Operation Contracts
|
||||||
|
|
||||||
|
Successful tools return `isError:false` with structuredContent
|
||||||
|
`{"status":"ok","value":{...}}`. Domain/admission failures return
|
||||||
|
`isError:true` with `{"status":"error","error":{"code":"...","message":"..."}}`.
|
||||||
|
Both include a text content block serializing the same structured data for clients
|
||||||
|
that do not render structuredContent. Clients use error codes, not parsed prose.
|
||||||
|
|
||||||
|
`AutomationFailure.Code` defines domain codes, including project-not-open,
|
||||||
|
not-granted, invalid-task, busy, unsupported language/capability, missing
|
||||||
|
reference/documentation, out-of-scope/read-only scope, missing operation/build/
|
||||||
|
runtime session, duplicate-ID parameter conflict, unavailable/incompatible runtime,
|
||||||
|
missing frame, exceeded limit, not-cancelable and infrastructure failure.
|
||||||
|
Unknown methods, malformed JSON-RPC and schema-invalid arguments remain protocol
|
||||||
|
errors (-32601, -32600/-32700 and -32602); unexpected internals use sanitized
|
||||||
|
-32603 responses, never request bodies, stack traces or credentials.
|
||||||
|
|
||||||
|
Build failure and guest fault are **operation outcomes**, not implicit release.
|
||||||
|
`TrackedOperation` carries the existing `OperationSnapshot`, clientRequestId,
|
||||||
|
known progress and either the existing typed build result or runtime outcome.
|
||||||
|
Unknown requested/completed frame counts are null. Terminal infrastructure
|
||||||
|
failure/cancellation MUST preserve only known progress. Cancellation acknowledgement
|
||||||
|
does not assert worker termination or grant manual control.
|
||||||
|
|
||||||
|
The wire receipt flattens operationId/state from the neutral operation snapshot.
|
||||||
|
Polling additionally returns progress and typed result/failure; incomplete results
|
||||||
|
are null. Build results retain diagnostics/artifact correlation. Runtime results
|
||||||
|
retain requested/completed frames and distinguish success, guest fault,
|
||||||
|
termination, cancellation and infrastructure failure. Captured results include
|
||||||
|
the same MCP image block used by direct capture.
|
||||||
|
|
||||||
|
`clientRequestId` deduplication is task-local and in-memory. Same ID plus same
|
||||||
|
effective parameters returns the same operation; changed parameters fail with
|
||||||
|
CLIENT_REQUEST_CONFLICT. Operation lookup accepts exactly one key. Revoked,
|
||||||
|
cross-project or old task identities cannot read/cancel cached work. Neither MCP
|
||||||
|
JSON-RPC IDs nor runtime requestIds replace this identity. Restart never restores
|
||||||
|
the registry, replays an advance or recovers authorization.
|
||||||
|
|
||||||
|
### 4.1 Task Work and Correlation
|
||||||
|
|
||||||
|
`TaskTools` is the neutral service surface; MCP only validates schemas and projects
|
||||||
|
its results. The Core implementation admits work through `AutomationSession.submit`
|
||||||
|
and the existing operation executor, sharing DEV's busy state and cancellation.
|
||||||
|
Acquisition requires the prior human grant. Release reports `MANUAL` only after
|
||||||
|
managed cleanup and document refresh succeed; cleanup failures remain explicit.
|
||||||
|
|
||||||
|
Admission and request registration are atomic per project. Deduplication uses the
|
||||||
|
operation kind and effective parameters, including requested frames. It is checked
|
||||||
|
after task authority and before busy/active-runtime validation, so a repeated
|
||||||
|
accepted start still resolves its original operation after that work has ended.
|
||||||
|
Rejected starts do not reserve clientRequestIds. Distinct requests cannot silently
|
||||||
|
queue behind busy work. Other projects remain independent.
|
||||||
|
|
||||||
|
Polling returns `workerTerminated` separately from operation state. `CANCELLED`
|
||||||
|
may acknowledge interruption before the worker exits; it does not permit another
|
||||||
|
conflicting operation or manual control. Final results remain null until worker
|
||||||
|
termination. Progress contains only provider-reported counts and can be unknown.
|
||||||
|
A cooperative final capture is published to DEV before termination while the task
|
||||||
|
is still valid. A revoked task cannot publish a late frame or retrieve cached work.
|
||||||
|
Historical operation images are marked stale when they no longer match DEV's
|
||||||
|
current session/build/frame, or DEV has marked that capture stale.
|
||||||
|
|
||||||
|
Build executes the same saved-project compiler/packer preparation as manual
|
||||||
|
Shipper, under task admission rather than a manual lease. It checks cancellation
|
||||||
|
between compilation, validation and packaging phases. A successful build receives
|
||||||
|
a task-local buildId; failed builds retain typed diagnostics and do not release
|
||||||
|
control. Before rebuilding, the managed runtime must finish shutdown and detach.
|
||||||
|
Old buildIds are invalidated before overwriting artifacts, including when the new
|
||||||
|
build fails. This is artifact correlation, not source snapshots or recovery.
|
||||||
|
|
||||||
|
Headless handlers consume a neutral `HeadlessGateway` session port. Boot accepts
|
||||||
|
only a current successful task build; one runtime session may be attached at a
|
||||||
|
time. Input is normalized to a complete replacement snapshot. Advance limits come
|
||||||
|
from that session and are enforced without clamping. Shutdown detaches only after
|
||||||
|
managed cleanup finishes. Runtime process supervision and protocol mapping belong
|
||||||
|
to the application gateway delivered in step 22, not to MCP or the test doubles.
|
||||||
|
|
||||||
|
Reset leaves the attached process unbooted, marks the previous capture stale and
|
||||||
|
retains its build association. A subsequent explicit `studio_headless_boot` with
|
||||||
|
that same current buildId reboots the known cartridge within the session. Boot
|
||||||
|
without reset while a runtime is attached is rejected as busy. Reset does not
|
||||||
|
change task authority or implicitly start execution. Rebuilding ends and detaches
|
||||||
|
that process, invalidates previous buildIds and requires a fresh explicit boot.
|
||||||
|
Synchronous headless failures finish their worker before returning the error,
|
||||||
|
so a corrective call cannot race the failed worker's admission lock.
|
||||||
|
|
||||||
|
Task-local operation/build records are discarded after worker termination on
|
||||||
|
return, revocation or project closure. Cleanup failures never restore authority;
|
||||||
|
the records are still discarded after managed work stops. Neither connection
|
||||||
|
disconnect nor polling silence discards an authorized task's records.
|
||||||
|
|
||||||
|
## 5. Project Knowledge DTOs
|
||||||
|
|
||||||
|
Neutral `ProjectKnowledge.Context` contains projectRoot/projectName, languages,
|
||||||
|
libraries, editableRoots/readOnlyRoots, indexed references and explicit limitations.
|
||||||
|
Its source is the project manifest and installed providers, never an AI-only file.
|
||||||
|
|
||||||
|
Each language includes id/primary, separately identified languageVersion,
|
||||||
|
compilerVersion and sdkVersion, source extensions/roots, real capabilities and
|
||||||
|
reference IDs. Version has `value` and `source`; unknown value is null with
|
||||||
|
source `unknown`. Capability support distinguishes SUPPORTED/UNSUPPORTED/UNKNOWN
|
||||||
|
and can explain a limitation. Unknown declared language MUST NOT fall back to PBS.
|
||||||
|
|
||||||
|
Libraries include identity, known version, roots and whether they belong to the
|
||||||
|
editable project. External libraries and SDK remain read-only. Reference entries
|
||||||
|
identify id/title/owner/kind/version; kinds include QUICKSTART, SYNTAX, SEMANTICS,
|
||||||
|
EXAMPLE, SDK and LIBRARY. Indexed content belongs to its language/SDK owner.
|
||||||
|
|
||||||
|
Reference reads take an opaque ID from that index, not a path or arbitrary URI.
|
||||||
|
Offset defaults to 0; limit defaults to 4000 and accepts 1–16000 Unicode code
|
||||||
|
points. A page returns referenceId, offset, total, text and nextOffset (null at
|
||||||
|
end). Invalid pagination fails; unknown/traversal-like IDs cannot escape the
|
||||||
|
index. Installed reference content is resolved through the frontend's owner-maintained
|
||||||
|
reference provider, not a Studio-maintained language specification.
|
||||||
|
|
||||||
|
### 5.1 Manifest and Provider Resolution
|
||||||
|
|
||||||
|
`studio_project_context` resolves an exact, canonical root registered by an open
|
||||||
|
project session. It does not use the focused window, accept a source-directory
|
||||||
|
path as a project root, acquire a manual lease, or acquire task authority. The HTTP boundary separately requires the grant-published project credential. A session
|
||||||
|
is discoverable only after successful opening and until closure begins.
|
||||||
|
Unregistered/closed roots return `PROJECT_NOT_OPEN`.
|
||||||
|
|
||||||
|
Each call reads the saved `prometeu.json` and dependency manifests again. Missing
|
||||||
|
or invalid primary manifests fail explicitly instead of returning cached language
|
||||||
|
metadata. Languages are grouped by declared ID, with the primary flag derived
|
||||||
|
from the main manifest. Unknown IDs retain their identity and expose unsupported
|
||||||
|
build/LSP support; no default frontend is consulted.
|
||||||
|
|
||||||
|
Extensions and source roots come from the installed frontend specification.
|
||||||
|
LSP feature support comes from the same compiler bridge description used by the
|
||||||
|
existing LSP server, not from a duplicated PBS capability list. If that provider
|
||||||
|
cannot describe its LSP, support is UNKNOWN with an explicit limitation. These
|
||||||
|
are installed-provider capabilities, not a promise that the MCP language-query
|
||||||
|
tool is already composed or that any particular source file will compile.
|
||||||
|
|
||||||
|
Language versions remain unknown when no owner metadata exists. Compiler versions
|
||||||
|
use the installed frontend package's `Implementation-Version` only when present.
|
||||||
|
The requested SDK version has manifest provenance; the context distinguishes
|
||||||
|
versions supported by the installed provider from unsupported requests. Multiple
|
||||||
|
SDK requests for the same language yield an unknown aggregate version, an explicit
|
||||||
|
limitation and separate SDK library entries. These identifiers MUST NOT be
|
||||||
|
substituted for one another.
|
||||||
|
|
||||||
|
Dependency paths and registry entries use the compiler's existing resolver,
|
||||||
|
including its main-root-relative local path semantics and registry requirement.
|
||||||
|
Discovery does not create a registry, install dependencies or build sources.
|
||||||
|
Unresolved declarations remain visible with empty roots and limitations. Mixed
|
||||||
|
language graphs are described but reported as unsupported for the current build
|
||||||
|
pipeline. Discovery is bounded to 256 projects and 256 declarations per manifest.
|
||||||
|
|
||||||
|
The editable scope is the canonical project root **minus** read-only roots.
|
||||||
|
Read-only scope takes precedence: external/registry libraries and their transitive
|
||||||
|
dependencies remain protected even when stored beneath the project root or also
|
||||||
|
reachable through a local declaration. Source roots are canonicalized, including
|
||||||
|
symlink targets. SDK entries are always read-only; packaged SDK resources need not
|
||||||
|
have filesystem roots. Scope metadata does not sandbox an external agent's own
|
||||||
|
filesystem tools; the developer remains responsible for those tools and Git.
|
||||||
|
|
||||||
|
Paths in MCP results are absolute filesystem strings, not `file:` URIs.
|
||||||
|
|
||||||
|
### 5.2 Installed References and Pagination
|
||||||
|
|
||||||
|
An installed frontend MAY implement `FrontendReferenceProvider` through
|
||||||
|
`FrontendProvider.documentation()`. That compiler-side contract supplies indexed,
|
||||||
|
owner-maintained texts for an SDK major and project target. It does not depend on
|
||||||
|
Studio API or MCP. Studio projects these into neutral reference descriptors;
|
||||||
|
full texts MUST NOT be included in project context. Reference IDs are namespaced
|
||||||
|
by language (`<languageId>:`), unique within the selected project index and opaque
|
||||||
|
to callers. Studio MUST NOT interpret an ID as a filename, URI or URL.
|
||||||
|
|
||||||
|
PBS packages its numbered specifications and informative quickstart from their
|
||||||
|
owner directory, plus a compilable Game example and actual SDK sources/barrels.
|
||||||
|
A build-generated index binds these texts to the installed frontend using content
|
||||||
|
hashes. Distribution-only reads MUST work without a checkout or network. SDK and
|
||||||
|
example references identify their SDK major and target; unsupported selections
|
||||||
|
MUST NOT silently reuse another SDK/target. Numbered spec/draft revisions and the
|
||||||
|
reference-index schema revision MUST NOT be reported as language/compiler versions.
|
||||||
|
|
||||||
|
`studio_reference_read` is authenticated but does not require an acquired task; the transport still requires a grant-published project credential. It resolves the explicit open root and its current saved manifest selection
|
||||||
|
on every read. Changing SDK/target can invalidate previously advertised IDs.
|
||||||
|
Only IDs in that project's installed index can be read, including when other
|
||||||
|
languages/providers are installed globally. SDK and external-library texts remain
|
||||||
|
consultable, not editable through this surface.
|
||||||
|
|
||||||
|
Pagination counts Unicode code points: an astral character occupies one offset,
|
||||||
|
not two UTF-16 units. Offset 0/limit 4000 are defaults; limit MUST be 1–16000.
|
||||||
|
An offset equal to total returns empty text and null nextOffset. Offsets beyond
|
||||||
|
total, negative offsets, nonintegral values and integers beyond the implementation's
|
||||||
|
signed 32-bit range are invalid parameters, never wrapped/truncated to another page.
|
||||||
|
|
||||||
|
Missing or unreadable provider documentation yields `DOCUMENTATION_UNAVAILABLE`
|
||||||
|
limitations, not promised references. An uninstalled primary language yields
|
||||||
|
`UNSUPPORTED_LANGUAGE` for reference reads; an available index without the requested
|
||||||
|
ID yields `REFERENCE_NOT_FOUND`. Closed projects yield `PROJECT_NOT_OPEN` before
|
||||||
|
reference lookup. These failures do not grant/revoke task authority.
|
||||||
|
|
||||||
|
## 6. Image Contract
|
||||||
|
|
||||||
|
MCP image content has `type:image`, `mimeType:image/png`, and base64 `data` of
|
||||||
|
the unchanged `CanonicalCapture.png` bytes. No screenshot, log scraping, temporary
|
||||||
|
path or network fetch is required. The structured value includes sessionId,
|
||||||
|
buildId, logicalFrameIndex, frameId, width, height, stridePixels, pixelFormat
|
||||||
|
`RGBA8888`, mimeType and stale. Stride describes the original framebuffer, not PNG
|
||||||
|
compression/padding. Logical and render frame counters are independent.
|
||||||
|
|
||||||
|
The adapter MUST NOT invent a frame when none exists or substitute another
|
||||||
|
session's image. The same neutral capture feeds DEV and MCP. Real runtime
|
||||||
|
production/cross-language equality is verified by the phase 4 desktop integration
|
||||||
|
gate below; encoding test pixels in contract tests alone does not satisfy it.
|
||||||
|
|
||||||
|
## 7. Conformance and Delivery Boundary
|
||||||
|
|
||||||
|
Contract tests validate every tool's example, authority level, required project/
|
||||||
|
task IDs, invalid types/unknown fields, exclusive operation lookup, input ranges,
|
||||||
|
pagination, result envelopes, PNG bytes and independent frame identities.
|
||||||
|
HTTP tests use a real loopback listener/client and exercise initialization,
|
||||||
|
authentication, Origin, endpoint/method/version handling, tool dispatch, malformed
|
||||||
|
or oversized input, closure, restart and old-token rejection. Provider doubles
|
||||||
|
exist only in tests. Composition starts/closes transport with Studio.
|
||||||
|
|
||||||
|
The production registry composes all 17 tools as of step 23, including headless
|
||||||
|
handlers bound to the actual `HeadlessProcessGateway`. Missing project runtime
|
||||||
|
configuration fails at boot with `RUNTIME_UNAVAILABLE`; tool discovery does not
|
||||||
|
grant authority or launch a process. No fake runtime is shipped.
|
||||||
|
The former configuration-copy flow is superseded by DEC-0061 permanent preparation and grant-time discovery. The automated HTTP conformance
|
||||||
|
gate exercises all 17 tool contracts using real project knowledge/LSP and test-only
|
||||||
|
build/runtime ports; a separate HTTP test uses the real compiler/packer. This
|
||||||
|
completes MCP-phase conformance. The packaged-runtime gate additionally exercises
|
||||||
|
actual app composition, project LSP, compiler/packer, saved edits, explicit
|
||||||
|
reset/reboot, build identity invalidation and corrective loops after compile
|
||||||
|
errors/guest faults.
|
||||||
|
|
||||||
|
Step 24 adds `headlessMcpDesktopTest`: a real HTTP client drives the composed app,
|
||||||
|
installed compiler/packer/LSP and packaged Rust runtime, while the actual JavaFX
|
||||||
|
DEV view observes the shared session. An independent test-only JSONL client runs
|
||||||
|
the same saved cartridge and input timeline in another real process, without the
|
||||||
|
Studio process adapter or capture DTOs. Raw PNG bytes and each capture metadata
|
||||||
|
field match MCP; all decoded framebuffer pixels and the visible identity/stale
|
||||||
|
labels match DEV. State/fault and deterministic reset/fresh-session repetitions
|
||||||
|
are also checked. Rebuilding changes pixels/build identity and visibly marks the
|
||||||
|
old capture stale. Images remain in memory; window screenshots are not evidence.
|
||||||
|
|
||||||
|
The fixture uses supported project-source LSP definition/symbol navigation and
|
||||||
|
indexed SDK reads. A probe of the installed SDK's `Input.pad()` definition returns
|
||||||
|
an empty result with the current language service; the gate does not claim SDK
|
||||||
|
symbol navigation where no location is returned. This is a language tooling
|
||||||
|
limitation, not a headless or MCP execution fallback.
|
||||||
|
|
||||||
|
Step 25 extends that real desktop/HTTP gate with active-operation cancellation,
|
||||||
|
connection deletion/reconnection and duplicate receipts, waiting/active revoke,
|
||||||
|
late-call rejection, project closure/reopening and application-context shutdown.
|
||||||
|
A controlled document participant delays refresh acknowledgement to prove that
|
||||||
|
manual control remains blocked until process cleanup and disk refresh complete;
|
||||||
|
it also checks that no revoked frame or old source buffer is applied afterward.
|
||||||
|
The real runtime is killed or suspended in test-owned processes to verify known
|
||||||
|
progress, no implicit restart/replay, forced cleanup and explicit human retry.
|
||||||
|
Compile errors and guest faults are corrected over HTTP within the same task.
|
||||||
|
The normal desktop Debug process starts after release and blocks a new grant.
|
||||||
|
The suspension/manual-Debug scenarios require a POSIX desktop and a free Debug
|
||||||
|
port 7777; the gate never attaches to an existing user's Debug process.
|
||||||
|
|
||||||
|
The automated client is not an external coding agent. Separate acceptance on
|
||||||
|
2026-09-29 used Codex CLI 0.158.0 against the packaged Studio and runtime 0.1.0
|
||||||
|
on macOS ARM64. The agent consulted references/LSP, edited saved PBS source,
|
||||||
|
built/packed, consumed native MCP PNGs, tested 1,110 frames of directional input,
|
||||||
|
and explicitly released authority. The developer confirmed DEV and then ran the
|
||||||
|
edited game through manual Debug Play. This establishes compatibility for that
|
||||||
|
client/platform, not uniform compatibility across providers or operating systems.
|
||||||
|
|
||||||
|
Full regression and distribution gates also passed: installed offline references,
|
||||||
|
real runtime protocol tests, architecture/Modulith, and two isolated startup/stop
|
||||||
|
cycles using the extracted Studio ZIP. The latter verified listener closure and
|
||||||
|
old-credential rejection after restart. API/Core and JavaFX MUST NOT import
|
||||||
|
MCP/HTTP implementations; architecture tests enforce it. Consolidated acceptance
|
||||||
|
evidence and deferred findings live in the DSC-0068 lesson, not in temporary logs.
|
||||||
|
|
||||||
|
### Integrated Connection Acceptance (DEC-0061)
|
||||||
|
|
||||||
|
Prior DSC-0068 native-client evidence covers the original HTTP flow only. The
|
||||||
|
integrated flow additionally requires a real native Codex session initialized
|
||||||
|
before grant, unchanged configuration through desktop restart/new grant, native
|
||||||
|
images/build/release, scaffold and existing-project preparation, installation
|
||||||
|
update and graphical launch, plus IntelliJ connector attachment. Automated
|
||||||
|
fixtures cannot substitute for these gates. PLN-0140 completed automated validation
|
||||||
|
and the user confirmed all outstanding manual gates on 2026-09-29. The manual
|
||||||
|
confirmation is user-reported acceptance, not an independently observed test run.
|
||||||
|
[LSN-0077](../../../discussion/lessons/DSC-0070-studio-persistent-mcp-connector/LSN-0077-integrated-mcp-stable-setup-and-ephemeral-access.md)
|
||||||
|
preserves the result and evidence provenance after workflow housekeeping.
|
||||||
|
|
||||||
|
### Automatic preparation when opening a project
|
||||||
|
|
||||||
|
Opening a project MUST prepare its enabled MCP integration using the same neutral
|
||||||
|
port as scaffold and DEV retry. Desktop composition MUST start the shared loopback
|
||||||
|
server before project sessions become available; no external command or separate
|
||||||
|
per-project desktop Run is required. Explicitly disabled integration MUST remain
|
||||||
|
disabled. Preparation failure MUST remain visible in DEV readiness without blocking
|
||||||
|
project use. Opening MUST NOT publish credentials or grant/acquire agent control.
|
||||||
|
The coding client continues to own its configured stdio process and initial trust.
|
||||||
@@ -73,13 +73,14 @@ Propagation rules:
|
|||||||
- propagation is workspace to global;
|
- propagation is workspace to global;
|
||||||
- global-to-workspace rebroadcast is not baseline behavior.
|
- global-to-workspace rebroadcast is not baseline behavior.
|
||||||
|
|
||||||
The global Studio bus is backed by a typed event bus reference owned by the Studio application container.
|
The global Studio bus is a JavaFX-adapter facility created by the application composition root and injected into the UI factory.
|
||||||
|
|
||||||
Container rules:
|
Composition rules:
|
||||||
|
|
||||||
- the Studio `Container` owns the global typed event bus reference used by `StudioEventBus`;
|
- `prometeu-app` owns construction and lifecycle of the shared UI bus;
|
||||||
- host-integrated services that need shared Studio operational visibility should receive that container-owned typed event bus reference during bootstrap instead of allocating disconnected local buses;
|
- UI composition roots receive the bus explicitly and workspace buses derive from that injected instance;
|
||||||
- the `Container` must be initialized during Studio boot before packer-backed integration services, workspaces, or adapters begin use.
|
- host integrations publish neutral application facts through their owning API boundary and may be adapted to UI events at the JavaFX edge;
|
||||||
|
- `p.studio.Container`, Spring context lookup, or another static service locator must not participate in event access.
|
||||||
|
|
||||||
This topology exists so callers do not need to duplicate publication decisions manually.
|
This topology exists so callers do not need to duplicate publication decisions manually.
|
||||||
|
|
||||||
@@ -98,6 +99,8 @@ Illustrative baseline categories include:
|
|||||||
- diagnostics update events;
|
- diagnostics update events;
|
||||||
- asset selection events.
|
- asset selection events.
|
||||||
|
|
||||||
|
Selection, navigation, attach/detach, edit scope, and presentation refresh are UI-local event categories. Application facts such as execution state, build results, runtime state, and asset operation results belong to neutral API contracts owned by their functional module and must not be defined only as JavaFX events.
|
||||||
|
|
||||||
For project bootstrap and splash/loading integration, the Studio event catalog should reserve typed events for:
|
For project bootstrap and splash/loading integration, the Studio event catalog should reserve typed events for:
|
||||||
|
|
||||||
- project loading started;
|
- project loading started;
|
||||||
|
|||||||
@@ -1,169 +1,66 @@
|
|||||||
# Studio Components Module Specification
|
# Studio JavaFX Components Boundary Specification
|
||||||
|
|
||||||
Status: Draft
|
## Status
|
||||||
Scope: `prometeu-studio-components` role, admission policy, and JavaFX wrapping boundary
|
|
||||||
Purpose: Define the authoritative visual control layer for the Studio.
|
Active
|
||||||
|
|
||||||
|
## Applies To
|
||||||
|
|
||||||
|
- `prometeu-studio-ui-javafx`
|
||||||
|
- shared Studio controls and workspace-framework primitives
|
||||||
|
- JavaFX controls actively used by the Studio
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Define the visual component boundary inside the JavaFX adapter without creating a second application or domain layer.
|
||||||
|
|
||||||
## Authority and Precedence
|
## Authority and Precedence
|
||||||
|
|
||||||
This specification consolidates the accepted Studio components module decision into normative form.
|
This specification is subordinate to [`9. Studio Core and Adapter Architecture Specification.md`](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md).
|
||||||
|
|
||||||
## Normative Inputs
|
|
||||||
|
|
||||||
- `prometeu-studio-components`
|
|
||||||
- Studio shell and workspace UI needs
|
|
||||||
- JavaFX controls actively used by the Studio
|
|
||||||
|
|
||||||
## Core Rules
|
## Core Rules
|
||||||
|
|
||||||
1. `prometeu-studio-components` is the official visual control module for Studio UI.
|
1. Reusable Studio visual controls belong to `prometeu-studio-ui-javafx`.
|
||||||
2. Studio UI should normally consume visual controls from `prometeu-studio-components`, not directly from raw JavaFX.
|
2. The JavaFX adapter may organize reusable controls by shell, forms, banks, lifecycle, navigation, feedback, and inspection roles.
|
||||||
3. A control enters the module when it is needed by the current Studio UI wave.
|
3. A control is admitted when it has an immediate Studio consumer; speculative mirroring of JavaFX is forbidden.
|
||||||
4. Controls in the module wrap and shape the JavaFX controls the Studio actively uses, but do not clone the full JavaFX API.
|
4. Shared controls must preserve theme, localization, and explicit visual-state behavior.
|
||||||
5. Every admitted control must preserve theme and i18n compatibility.
|
5. Controls that observe UI events must expose predictable attach/detach or subscribe/unsubscribe lifecycle behavior.
|
||||||
6. Reusable event-driven workspace controls should be admitted when they are part of the active Studio workspace framework.
|
6. Visual controls must depend on neutral Studio API contracts, not core or provider implementations.
|
||||||
|
7. Domain rules, application orchestration, filesystem workflows, compiler/Packer/LSP/runtime calls, and Spring composition do not belong in the visual component layer.
|
||||||
|
|
||||||
## Module Role
|
## JavaFX Wrapping Boundary
|
||||||
|
|
||||||
`prometeu-studio-components` is:
|
The Studio may use raw JavaFX for trivial local composition. A reusable control should expose the Studio-facing API actually needed instead of cloning the complete upstream JavaFX surface.
|
||||||
|
|
||||||
- the authoritative Studio control layer;
|
Shared controls may include:
|
||||||
- the home of the Studio visual dialect;
|
|
||||||
- the place where Studio-facing controls are shaped for Studio use;
|
|
||||||
- the preferred home for reusable lifecycle-aware workspace controls when those controls are part of the visible Studio UI dialect.
|
|
||||||
|
|
||||||
`prometeu-studio-components` is not:
|
- shell and action controls;
|
||||||
|
- workspace rails and hosts;
|
||||||
|
- form sections and action bars;
|
||||||
|
- list, tree, inspector, and dual-list surfaces;
|
||||||
|
- activity, progress, badges, headers, and feedback controls;
|
||||||
|
- lifecycle-managed visual primitives.
|
||||||
|
|
||||||
- a speculative generic framework;
|
## Construction and Lifecycle
|
||||||
- a full reimplementation of JavaFX;
|
|
||||||
- a dumping ground for unrelated non-visual infrastructure.
|
|
||||||
|
|
||||||
## Admission Policy
|
Controls, rows, dialogs, and views MUST NOT be Spring singletons by default. A Spring-managed JavaFX composition factory may create them with explicit constructor dependencies.
|
||||||
|
|
||||||
A control is admissible when it is needed by the current Studio UI work.
|
Controls that attach event subscriptions MUST release them when detached. UI-local events may coordinate selection, navigation, editing scope, attach/detach, and presentation refresh. Request/response application behavior MUST use injected Studio API services directly.
|
||||||
|
|
||||||
Rules:
|
## State Boundary
|
||||||
|
|
||||||
- immediate current Studio use is sufficient justification;
|
Presentation-only view models, form drafts, selection state, and formatting helpers may live beside JavaFX controls when they do not determine domain outcomes.
|
||||||
- a second use is not required when the control is clearly part of the shell or the current workspace surface;
|
|
||||||
- no control should be added without an immediate Studio consumer.
|
|
||||||
- a control needed first by one workspace may still be admitted when it is clearly intended as a reusable Studio workspace primitive.
|
|
||||||
|
|
||||||
## Studio Usage Rule
|
Non-visual policies and workflows that determine asset validity, capacity, metadata, build, runtime, project, or semantic results MUST live behind `prometeu-studio-api` and be implemented by `prometeu-studio-core` or an explicit infrastructure adapter.
|
||||||
|
|
||||||
The baseline Studio UI should not rely on raw JavaFX controls as its normal visual surface.
|
|
||||||
|
|
||||||
Rules:
|
|
||||||
|
|
||||||
- a visual control used by Studio should normally come from `prometeu-studio-components`;
|
|
||||||
- extremely trivial local composition may stay in `prometeu-studio`;
|
|
||||||
- local exceptions must remain exceptional rather than becoming the default path.
|
|
||||||
|
|
||||||
## Wrapping Boundary
|
|
||||||
|
|
||||||
Controls in `prometeu-studio-components` must wrap the JavaFX controls the Studio actively uses.
|
|
||||||
|
|
||||||
Rules:
|
|
||||||
|
|
||||||
- the Studio-layer control should expose the Studio-facing API actually needed;
|
|
||||||
- exhaustive mirroring of upstream JavaFX APIs is not required;
|
|
||||||
- the goal is consistency and clarity, not a perfect one-to-one mirror of every JavaFX type.
|
|
||||||
|
|
||||||
## Control Lifecycle Hooks
|
|
||||||
|
|
||||||
Studio controls may need to observe event buses or other external state.
|
|
||||||
|
|
||||||
Rules:
|
|
||||||
|
|
||||||
- the control layer must provide explicit subscribe and unsubscribe lifecycle methods that can be overridden when needed;
|
|
||||||
- the control layer should also provide `onAttached()` and `onDetached()` lifecycle hooks;
|
|
||||||
- `onAttached()` should call `subscribe()`;
|
|
||||||
- `onDetached()` should call `unsubscribe()`;
|
|
||||||
- controls that attach subscriptions must also define how those subscriptions are released;
|
|
||||||
- event-driven controls must not hide subscription lifecycle completely inside ad hoc local wiring.
|
|
||||||
|
|
||||||
These hooks exist so event-driven controls remain predictable and safe to embed in shell and workspace UI.
|
|
||||||
|
|
||||||
## Reusable Workspace Primitives
|
|
||||||
|
|
||||||
Some reusable controls are not shell-only and are not domain-specific either.
|
|
||||||
|
|
||||||
They may still belong in `prometeu-studio-components` when they are part of the visible Studio workspace framework.
|
|
||||||
|
|
||||||
Illustrative admissible examples include:
|
|
||||||
|
|
||||||
- projection hosts for list/tree/detail surfaces;
|
|
||||||
- lifecycle-managed row or item controls;
|
|
||||||
- reusable section or inspector surfaces;
|
|
||||||
- visible controls that encode local-patch versus structural-sync interaction patterns.
|
|
||||||
|
|
||||||
What does not belong here:
|
|
||||||
|
|
||||||
- workspace-specific orchestration logic;
|
|
||||||
- domain-specific service calls;
|
|
||||||
- hidden coordination code with no visible control responsibility.
|
|
||||||
|
|
||||||
## Typical Control Scope
|
|
||||||
|
|
||||||
Typical controls that belong in the module include:
|
|
||||||
|
|
||||||
- shell controls;
|
|
||||||
- action controls and buttons;
|
|
||||||
- tab systems;
|
|
||||||
- tree and list controls;
|
|
||||||
- inspector and panel surfaces;
|
|
||||||
- activity and feedback surfaces;
|
|
||||||
- badges, headers, and related Studio primitives.
|
|
||||||
|
|
||||||
What stays outside the module:
|
|
||||||
|
|
||||||
- workspace-specific composition logic;
|
|
||||||
- non-visual domain behavior;
|
|
||||||
- speculative controls with no immediate Studio consumer.
|
|
||||||
|
|
||||||
## Theme and i18n
|
|
||||||
|
|
||||||
Every admitted control must support:
|
|
||||||
|
|
||||||
- CSS-based theming;
|
|
||||||
- safe locale-aware text behavior when text is exposed;
|
|
||||||
- no hardcoded user-facing text;
|
|
||||||
- explicit visual states where state matters.
|
|
||||||
|
|
||||||
## Organization Guidance
|
|
||||||
|
|
||||||
The module should be organized by Studio role rather than vague technical buckets.
|
|
||||||
|
|
||||||
Illustrative areas include:
|
|
||||||
|
|
||||||
- shell;
|
|
||||||
- actions;
|
|
||||||
- navigation;
|
|
||||||
- feedback;
|
|
||||||
- inspection;
|
|
||||||
- trees.
|
|
||||||
|
|
||||||
## Anti-Bloat Rule
|
|
||||||
|
|
||||||
The module must remain:
|
|
||||||
|
|
||||||
- intentional;
|
|
||||||
- Studio-driven;
|
|
||||||
- small enough to reason about;
|
|
||||||
- broad enough to prevent UI entropy in the application.
|
|
||||||
|
|
||||||
## Non-Goals
|
## Non-Goals
|
||||||
|
|
||||||
- defining the first concrete component set in full detail
|
- creating a standalone `prometeu-studio-components` Gradle module;
|
||||||
- defining final package layout exhaustively
|
- wrapping the full JavaFX API;
|
||||||
- mirroring the entire JavaFX control hierarchy
|
- storing workspace business logic in controls;
|
||||||
- storing domain-specific workspace orchestration code in the components module
|
- using Spring as a registry for each visual object;
|
||||||
|
- defining components for a future web UI.
|
||||||
|
|
||||||
## Exit Criteria
|
## Exit Criteria
|
||||||
|
|
||||||
This specification is complete enough when:
|
This specification is satisfied when reusable JavaFX controls have clear visual ownership, explicit lifecycle behavior, neutral injected dependencies, and no application or provider implementation responsibilities.
|
||||||
|
|
||||||
- the module role is unambiguous;
|
|
||||||
- admission rules are stable enough to guide implementation;
|
|
||||||
- reusable workspace-control admission is clear enough to prevent local reimplementation drift;
|
|
||||||
- the JavaFX wrapping boundary is clear enough to prevent drift.
|
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ Active
|
|||||||
|
|
||||||
## Applies To
|
## Applies To
|
||||||
|
|
||||||
- `prometeu-studio`
|
- `prometeu-studio-api`
|
||||||
|
- `prometeu-studio-core`
|
||||||
|
- `prometeu-studio-ui-javafx`
|
||||||
|
- `prometeu-app`
|
||||||
- the Studio `Assets` workspace
|
- the Studio `Assets` workspace
|
||||||
- packer-facing Studio service integration for asset browsing, inspection, diagnostics, and staged mutations
|
- packer-facing Studio service integration for asset browsing, inspection, diagnostics, and staged mutations
|
||||||
|
|
||||||
@@ -29,6 +32,7 @@ This specification extends:
|
|||||||
- [`1. Studio Shell and Workspace Layout Specification.md`](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
|
- [`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)
|
- [`2. Studio UI Foundations Specification.md`](2.%20Studio%20UI%20Foundations%20Specification.md)
|
||||||
- [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
- [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
||||||
|
- [`9. Studio Core and Adapter Architecture Specification.md`](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md)
|
||||||
|
|
||||||
For packer-facing semantics, this specification must align with:
|
For packer-facing semantics, this specification must align with:
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ The workspace must assume:
|
|||||||
- diagnostics, activity, progress, and staged mutation responses are available from Studio-facing services;
|
- diagnostics, activity, progress, and staged mutation responses are available from Studio-facing services;
|
||||||
- packer-facing operational freshness may surface states such as `healthy`, `stale`, `diverged`, `reconciling`, or `failed`.
|
- packer-facing operational freshness may surface states such as `healthy`, `stale`, `diverged`, `reconciling`, or `failed`.
|
||||||
|
|
||||||
Packer-backed operational events consumed by this workspace are expected to enter Studio through the container-owned typed event bus path rather than through workspace-local ad hoc bus creation.
|
The JavaFX workspace must consume neutral Studio asset contracts. Stable public Packer APIs are consumed by Studio Core where appropriate; Packer bootstrap and concrete integration remain in `prometeu-app`. Packer-backed application facts may be projected into UI-local events at the JavaFX edge, but the workspace must not call Packer directly or create an ad hoc provider integration.
|
||||||
|
|
||||||
## Workspace Model
|
## Workspace Model
|
||||||
|
|
||||||
@@ -100,6 +104,7 @@ The `Assets` workspace must be implemented as a composition root plus lifecycle-
|
|||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- the workspace root should coordinate service calls, workspace state, and structural synchronization;
|
- the workspace root should coordinate service calls, workspace state, and structural synchronization;
|
||||||
|
- service calls must target injected `prometeu-studio-api` contracts; domain workflows and filesystem orchestration must not be implemented by the workspace root;
|
||||||
- the workspace root should not own the render and update path of every navigator row, details section, and form control directly;
|
- the workspace root should not own the render and update path of every navigator row, details section, and form control directly;
|
||||||
- the navigator host, asset rows, selected-asset details host, and details-internal sections/forms should subscribe only to the events and state they consume;
|
- the navigator host, asset rows, selected-asset details host, and details-internal sections/forms should subscribe only to the events and state they consume;
|
||||||
- event-consuming controls must subscribe only while mounted in the UI tree;
|
- event-consuming controls must subscribe only while mounted in the UI tree;
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ Active
|
|||||||
|
|
||||||
## Applies To
|
## Applies To
|
||||||
|
|
||||||
- `prometeu-studio`
|
- `prometeu-studio-api`
|
||||||
|
- `prometeu-studio-core`
|
||||||
|
- `prometeu-studio-ui-javafx`
|
||||||
|
- `prometeu-app`
|
||||||
- Studio project-session persistence under `.studio/`
|
- Studio project-session persistence under `.studio/`
|
||||||
- project-local Studio session restoration state
|
- project-local Studio session restoration state
|
||||||
- project-local Studio setup configuration
|
- project-local Studio setup configuration
|
||||||
@@ -26,7 +29,7 @@ It extends:
|
|||||||
## Core Rules
|
## Core Rules
|
||||||
|
|
||||||
1. The canonical root for project-local Studio persistence MUST be `.studio/` in the project root.
|
1. The canonical root for project-local Studio persistence MUST be `.studio/` in the project root.
|
||||||
2. The main project-local Studio session-restoration store MUST be owned by `StudioProjectSession`, or by a service explicitly owned by `StudioProjectSession`.
|
2. The main project-local Studio session-restoration store MUST be owned by the neutral project-session boundary, implemented in `p.studio.core.session` or by a project service explicitly composed into that session.
|
||||||
3. The main session-restoration store MUST remain a single file at `.studio/state.json`.
|
3. The main session-restoration store MUST remain a single file at `.studio/state.json`.
|
||||||
4. The main session-restoration store MUST be versioned.
|
4. The main session-restoration store MUST be versioned.
|
||||||
5. The main session-restoration store MUST load when the project session opens.
|
5. The main session-restoration store MUST load when the project session opens.
|
||||||
@@ -76,6 +79,8 @@ The main session-restoration store MUST NOT include:
|
|||||||
- heavy operational output;
|
- heavy operational output;
|
||||||
- recomputable results that do not represent session restoration state.
|
- recomputable results that do not represent session restoration state.
|
||||||
|
|
||||||
|
Under DEC-0060, automation grants, task/control identities, active runtime sessions and the task-local operation/deduplication registry MUST NOT be persisted or restored through `.studio/state.json` or `.studio/setup.json`. Reopening a project MUST start under manual control. Restoring DEV as the selected workspace is presentation restoration, not permission to resume work. MCP connection credentials MUST NOT be stored in versioned files; they are regenerated for every project grant and never restored on restart. See the [DEV and Automation Specification](10.%20DEV%20and%20Automation%20Specification.md).
|
||||||
|
|
||||||
`Project-local activity` and project-local setup may still live under `.studio/`, but they are separate persistence concerns and not part of the main session-restoration store defined here.
|
`Project-local activity` and project-local setup may still live under `.studio/`, but they are separate persistence concerns and not part of the main session-restoration store defined here.
|
||||||
|
|
||||||
## Ownership Rules
|
## Ownership Rules
|
||||||
@@ -100,3 +105,36 @@ This specification is complete enough when:
|
|||||||
- accepted and excluded categories are explicit;
|
- accepted and excluded categories are explicit;
|
||||||
- load, restore, save, and fallback timing are explicit;
|
- load, restore, save, and fallback timing are explicit;
|
||||||
- and the ownership boundary with `StudioProjectSession` is normatively locked.
|
- and the ownership boundary with `StudioProjectSession` is normatively locked.
|
||||||
|
|
||||||
|
## Integrated MCP Discovery (DEC-0061)
|
||||||
|
|
||||||
|
`.studio/setup.json` MUST carry neutral `agentIntegration` intent with
|
||||||
|
`schemaVersion:1`, `enabled` and `clientProfile`. Preserve runtime and editor
|
||||||
|
fields. This intent is configuration, not readiness or authorization. Machine-local
|
||||||
|
resolved client configuration is a separate preparation output.
|
||||||
|
|
||||||
|
The transient descriptor is `.studio/mcp/connection.json`, limited to 16 KiB.
|
||||||
|
Schema v1 requires integral `schemaVersion:1` and nonempty string `instanceId`,
|
||||||
|
`projectRoot`, `endpoint`, `credential`, `catalogFingerprint`. Root MUST match the
|
||||||
|
connector's canonical root. Endpoint MUST be `http://127.0.0.1:<port>/mcp`, with
|
||||||
|
no userinfo, query, fragment or redirect. Grant/task IDs and receipts are forbidden.
|
||||||
|
|
||||||
|
On macOS `.studio/mcp` MUST be owned by the current user with mode 0700;
|
||||||
|
descriptor, lock and temporary files MUST be 0600 before secrets are written.
|
||||||
|
Reject symlinked/unsafe paths and tracked descriptor targets. Add precise ignore
|
||||||
|
rules idempotently without changing unrelated project permissions or files.
|
||||||
|
|
||||||
|
Ownership MUST use an OS-held lock on the stable `publication.lock` inode; do
|
||||||
|
not delete the lock file on ordinary cleanup. A second live publisher fails. A
|
||||||
|
crashed process releases its lock through the OS; a new owner may atomically
|
||||||
|
replace stale content. Write a protected same-directory temporary file and
|
||||||
|
atomically rename it. Cleanup checks both instance and publication generation
|
||||||
|
so an old callback cannot remove newer discovery data.
|
||||||
|
|
||||||
|
Publication is a required grant lifecycle participant, not a swallowed observer.
|
||||||
|
Prepare/publish occur outside the Core monitor; authority activation uses a
|
||||||
|
generation fence. Acquisition cannot succeed until publication and grant both
|
||||||
|
commit. Failure aborts credentials/files and reports a failed grant. Revoke/close
|
||||||
|
invalidate credentials before asynchronous work cleanup, then remove owned
|
||||||
|
publication and release ownership. File cleanup failure MUST NOT prevent runtime
|
||||||
|
cancellation. An already-admitted release response MUST remain deliverable.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user