Registry, CLI, and analysis must agree on one package name.
Design model
Platform spec article
Design model
Spec standingStandard
-
Published and resolved identity is corelib, not ad-hoc forks.
Context
Decision
Rule Detail Identity Package name corelib; sources underbeskid_corelibLegacy standard_librarypaths may alias; identity remainscorelibConsequences
pckg publish, resolver, and docs use the same identity string.
Verification anchors
resolver.rs;beskid_testscorelib project fixtures. -
Env, repo walk, and bundled CLI materialize the same tree.
Context
Developers run from superrepo, installed CLI, or CI without divergent roots.
Decision
Rule Detail BESKID_CORELIB_ROOTPoints at root containing beskid_corelib/Project.projWalk Ancestor search for compiler/corelib/beskid_corelibBundle beskid_cliensure_corelib_readymaterializes embedded treeConsequences
Missing roots fail fast with resolver diagnostics.
Verification anchors
corelib_runtime.rs;resolver.rstests. -
Pack copies declared readme into README.md for registry docs.
Context
Registry consumers expect root README.md in
.bpkartifacts.Decision
Rule Detail Declare Optional readme = "path.md"in Project.projDefault readme.mdat package root when presentPack beskid pckg packplaces resolved file asREADME.mdConsequences
pckg documentation ingest uses consistent entry filename.
Verification anchors
PackagePublishDocumentation.cs; pack integration tests. -
corelib_console is a workspace member depended on by beskid_corelib.
Context
Console/ANSI must ship with the aggregate package, not as an orphan.
Decision
Rule Detail Workspace compiler/corelib/Workspace.projlistspackages/consoleAggregate beskid_corelibdepends oncorelib_consoleConsequences
Publish CI packs the full workspace graph for registry corelib.
Verification anchors
Workspace.proj; corelib CI publish job.
- Contracts and edge cases Normative guarantees and known edge cases for `Corelib discovery and packaging`.
- Design model Conceptual model for `Corelib discovery and packaging` and its subsystem boundaries.
- Examples Practical examples that demonstrate `Corelib discovery and packaging` behavior.
- FAQ and troubleshooting Common questions and debugging guidance for `Corelib discovery and packaging`.
- Flow and algorithm End-to-end control flow for corelib discovery, materialization, and packaging.
- Verification and traceability How `Corelib discovery and packaging` requirements map to tests and implementation anchors.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”One canonical corelib package identity (corelib, sources under compiler/corelib/beskid_corelib) must be discoverable by CLI, LSP, CI publish, and local superrepo layouts. This feature covers where that tree lives on disk and how it is packed for pckg—not symbol injection (see Corelib injection and resolution).
Discovery and packaging topology
Section titled “Discovery and packaging topology”flowchart TB
subgraph sources [Source tree]
WS[compiler/corelib/Workspace.proj]
Agg[beskid_corelib Project.proj]
Pkgs[packages: foundation, runtime, console, compiler-sdk]
WS --> Agg --> Pkgs
end
subgraph discovery [Discovery]
Env[BESKID_CORELIB_ROOT]
Walk[Repo ancestor walk]
Bundle[CLI bundled corelib]
end
subgraph publish [Publish]
Doc[beskid doc → .beskid/docs]
Pack[beskid pckg pack → .bpk]
Reg[pckg registry corelib identity]
end
Env --> Agg
Walk --> Agg
Bundle --> Agg
Agg --> Doc --> Pack --> Reg
Primary actors
Section titled “Primary actors”| Actor | Role |
|---|---|
| Aggregate package | beskid_corelib — declares dependencies on workspace member packages |
| Workspace | compiler/corelib/Workspace.proj lists shards including corelib_console |
| Toolchain | resolver.rs + beskid_cli corelib_runtime locate roots |
| Registry | CI publishes corelib via beskid pckg + BESKID_PCKG_KEY |
Package readme
Section titled “Package readme”Published .bpk artifacts should expose registry documentation through root README.md. Producers declare the on-disk source in Project.proj or Workspace.proj:
- Optional
readme = "relative/path.md"(POSIX-style path relative to the package or workspace root). - When omitted, tooling uses
readme.mdat that root when the file exists. beskid pckg packcopies the resolved file into the artifact asREADME.mdwhen it is not already a root readme entry.
Workspace members
Section titled “Workspace members”compiler/corelib/Workspace.proj includes packages/console (corelib_console) alongside foundation, runtime, and compiler-sdk. The aggregate beskid_corelib project depends on corelib_console for console/ANSI surfaces.
Implementation anchors
Section titled “Implementation anchors”- Canonical package root:
compiler/corelib/beskid_corelib - Console package:
compiler/corelib/packages/console - Discovery:
compiler/crates/beskid_analysis/src/projects/graph/resolver.rs - CLI embedding:
compiler/crates/beskid_cli/build.rs,corelib_runtime.rs - Tests:
compiler/crates/beskid_tests/src/projects/corelib - Server ingest:
pckg/src/Server/Services/PackagePublishDocumentation.cs