implements PLN-0005

This commit is contained in:
2026-03-27 17:01:40 +00:00
parent 124c6d078e
commit e0c57814e1
12 changed files with 143 additions and 10 deletions
@@ -20,11 +20,15 @@ This document is the authority for how the compiler discovers and loads:
- ordinary project modules,
- reserved stdlib modules such as `@sdk:gfx`,
- compile-time reserved metadata attached to those reserved modules,
- and interface-only service facades that wrap host surfaces for source ergonomics.
- interface-only service facades that wrap host surfaces for source ergonomics,
- and backend-provided compile surfaces consumed by the frontend for symbolic authoring.
This document does not define runtime load behavior.
PBX host-binding emission and loader-side syscall resolution are defined by the Host ABI Binding and Loader Resolution Specification.
It also does not define the raw packer snapshot format.
Frontend-facing compile surfaces consume only the backend-owned surface contract selected for the active build.
## 2. Scope
This document defines:
@@ -37,6 +41,7 @@ This document defines:
- reserved project spaces such as `@sdk:*` and `@core:*`,
- the source model for stdlib interface modules,
- the compile-time role of reserved attributes such as `[Host(...)]`.
- the boundary between backend-owned compile surfaces and frontend semantic consumption.
This document does not define:
@@ -44,10 +49,23 @@ This document does not define:
- loader-side syscall resolution,
- cartridge capability policy,
- package registry protocol details,
- runtime reflection over attributes.
- runtime reflection over attributes,
- or the full operational snapshot model owned by packer.
## 3. Core Terms
### 3.5 Backend-owned frontend surface context
The compiler backend may provide a frontend-facing semantic surface context to the active language frontend.
Rules:
- The frontend surface context is backend-owned.
- The frontend surface context is not the raw operational snapshot owned by packer or other domain services.
- The frontend surface context exists to support semantic consumption, diagnostics, and tooling-oriented source interpretation.
- For PBS asset references in v1, the frontend surface context asset slice SHALL be `List<Addressable(address, asset_id)>`.
- Future surface slices MAY exist, but they are outside this document's v1 PBS asset contract.
### 3.1 Project
A project is the unit described by `prometeu.json`.
@@ -258,6 +276,17 @@ For an import:
import { X } from @project:path/to/module;
```
## 9. Backend-Owned Symbolic Compile Surfaces
Some source-level semantics depend on backend-owned symbolic surfaces rather than on imported stdlib modules alone.
Rules:
- A symbolic compile surface consumed by the frontend MUST enter through the backend/frontend compile contract, not through direct frontend service queries.
- PBS symbolic asset references are resolved from the backend-owned frontend surface context rather than from stdlib import discovery.
- Stdlib interfaces such as `@sdk:asset` define host-backed callable surfaces, but they do not replace backend ownership of symbolic `Addressable` resolution.
- The backend/frontend contract MAY carry symbolic surfaces that are not themselves importable modules.
the compiler MUST:
1. parse the project space and module path,