Library layer extraction (from canvas)
Policies that keep the org coherent
name: Library layer extractions overview: "Execute the canvas extraction order: lift library-shaped code out of apps into the correct Novolis packages, fix Game.Session product leakage, and tidy remaining stack/policy debt — publishing to GitHub Packages between cross-repo consumers." todos:
- id: phase-1-mesh
content: Extract Mesh.Kernel → Novolis.Simulation.Mesh; Sins PackageReference; publish GPR status: completed
- id: phase-2-session
content: Genericize Game.Session DTOs/endpoints; retarget Sins + AvaloniaAgentMcp status: completed
- id: phase-3-calypso-cad
content: CalypsoCad consume Cad.Primitives; move OpeningDerivation; publish cad status: completed
- id: phase-4-economy
content: Lift CreditCirculation + AstroEconomyBridge into economy; dedup NearSol status: completed
- id: phase-5-avalonia-live
content: Carve Novolis.Avalonia.Live from LiveStudio; publish avalonia status: completed
- id: phase-6-misfiled
content: Move Modeling.Scene→cad, Agent.Surface→commands; Avalonia.3D PackageReference status: completed
- id: phase-7-cameras
content: Map camera to Simulation.View; remove SilkOrbitCamera; rename TwoDCamera status: completed
- id: phase-8-residual
content: Racing Vector3 XZ; workflows docs clarification status: completed isProject: false
Source: library-layer-misplacement.canvas.tsx
Constraint: NuGet-only cross-repo — after each packable change, publish 2026.1.* to GitHub Packages before consumers can restore. Use Novolis.Platform.slnx ProjectReference mode for local iteration only.
flowchart LR
subgraph apps [Apps holding libs]
SinsMesh[Sins Mesh.Kernel]
Live[LiveStudio Live]
Calypso[CalypsoCad fork]
Dup[CreditCirculation x2]
end
subgraph libs [Correct homes]
SimMesh[Simulation.Mesh]
CadPrim[Cad.Primitives]
Avalive[Avalonia.Live]
EcoFin[Economy.Finance]
end
SinsMesh --> SimMesh
Live --> Avalive
Calypso --> CadPrim
Dup --> EcoFinPhase 1 — Mesh kernel → `Novolis.Simulation.Mesh`
Repo: novolis-simulation
- Add packable
Novolis.Simulation.Meshfrom Universe/Mesh files under...Mesh.Kernel(engines, state, pathfinder, pipeline). Public API; dropinternal. - Leave Universe/Mesh/Sins in the app (gameplay pulse, spot ledger, captain inbox).
- Sins PackageReferences the new package; delete moved kernel sources.
- Unit tests for flood/TTL/mailbox/pathfind in simulation tests.
- Publish GPR; regen Platform map via
Generate-Platform-Slnx.ps1.
Phase 2 — Genericize `Novolis.Game.Session`
Repo: novolis-gaming + novolis-apps Sins/Captain Bridge adapters
Per gaming-layer-policy.md: no product domain in session contracts.
- In SessionDtos.cs:
- Replace
SpotFreight/GoodsCharters/MarketLotswithSessionBoardDto[] Boards(Id+SessionBoardItemDto[]). - Collapse product-named status strings into a fixed generic set (
StatusLinesdictionary or numberedLine0..N) — keep MessagePack keys stable where possible via reserved keys / version bump to1.1. - Slim
SessionCommandDtotoActionId+IDictionary<string,string>(or string params bag); drop hard-codedSku/DestSystemIdas first-class fields. - SessionEndpoints.cs: rename
SinsPipeName→ app-owned constant in Sins; platform keeps onlyDefaultPipeName = "novolis-game-session". SessionSurface requires explicit pipe or uses Default — never Sins-branded. - Update Sins
CaptainDesk*mappers and dogfoodingAvaloniaAgentMcpknown endpoint to the app constant. - Bump protocol version; publish gaming; retarget apps.
Phase 3 — CalypsoCad → `Novolis.Cad.Primitives`
Repos: novolis-dogfooding CalypsoCad, novolis-cad
- Delete forked model in CalypsoCad/Models/CadModels.cs; PackageReference
Novolis.Cad.Primitives(same pattern as DraftStudio). - Move OpeningDerivation.cs into
Novolis.Cad.Primitives(ops helper), publish, consume from CalypsoCad. - Keep CalypsoRevGGenerator, palette, interior ensembles as product.
Phase 4 — Economy dedup
Repo: novolis-economy + consumers
- Lift CreditCirculation.cs into
Novolis.Economy.Financeas publicCreditCirculation(strip Sins namespace; keepEconomySimulationcoupling). - Lift AstroEconomyBridge.cs into
Novolis.Economy.LogisticsasAstroEconomyBridge(catalog/route → hubs/corridors). - Delete NearSolPolity copies; both apps PackageReference Finance + Logistics.
- Publish economy; slim NearSolPolity to scenario host.
Phase 5 — `Novolis.Avalonia.Live`
Repo: novolis-avalonia + novolis-apps LiveStudio
- New packable
Novolis.Avalonia.Livefrom LiveStudio/studio/Components/Live (files marked “Designed to move into Novolis.Avalonia.Live”). - LiveStudio becomes thin host PackageReference; leave product workspace wiring / demo scripts in the app.
- Publish avalonia; wire apps
Directory.Packages.props.
Phase 6 — Misfiled Avalonia packages
Repos: novolis-avalonia, novolis-cad, novolis-commands
Keep PackageId / namespaces stable (no consumer rename).
- Physically move Novolis.Modeling.Scene →
novolis-cad(headless mesh graph belongs with CAD, not UI). - Physically move Novolis.Agent.Surface →
novolis-commands(agent hosts, no Avalonia). - Novolis.Avalonia.3D switches from ProjectReference to PackageReference for both.
- Update slnx / Platform map; publish cad + commands; avalonia restore from GPR.
Phase 7 — Camera policy cleanup
Repos: novolis-simulation, novolis-rendering, dogfooding RtsLite
- Add map-style rig to
Novolis.Simulation.Viewfrom RtsClassicCamera.cs (~120 LOC); RtsLite consumes View + input wiring only. - Remove SilkOrbitCamera.cs; Silk demos compose
OrbitCameraRig/ViewPoseat app layer (or thin adapter next to demos). - Rename TwoDCamera →
TwoDViewport(or equivalent non-Camera name); update Rendering.TwoD + dogfoodOrthoPanCameraconsumers. - Publish simulation + rendering; fix dogfooding.
Phase 8 — Residual policy debt
Novolis.Simulation.Racing: finish Vector2 → planarVector3(Y = 0); removeNOV2002NoWarn.- Docs only: gaming-layer-policy.md and related — state
novolis-workflowsis GitHub Actions shared workflows, not WorkflowEngine; WorkflowEngine import targets a futurenovolis-workflow-engine(no CI repo rename in this plan).
Done criteria (each phase)
pwsh -File novolis-governance/scripts/verify-nuget-only.ps1andverify-project-ref-mode.ps1 -SkipBuildexit 0- Affected packages published to GitHub Packages
- Consumers restore/build with nuget.org + github only
- Update canvas checkmarks / close findings as phases land
Out of scope (canvas “stay in apps”): Sins Drama/Player/CalypsoTheme, Keel stage recipes, NeuralRacing, BridgeCommander, ViewPose→CameraSnapshot compose bridges, Commerce insurance pulse generalization (P1 follow-up after Phase 4).