solidcraft-layers
Installation
SKILL.md
Where code goes: SolidCraft or solidcore
The authority is solidcore/docs/layers.md; this is its short form. Every job lives in exactly one layer, and two implementations of one job are a bug.
Decide
- Does it compute geometry? Anything computed from coordinates: a point, vector, length, angle, curvature, curve or surface, a solve, an intersection, a fit, a mesh, a STEP parse. Then it is a kernel primitive in
solidcore/crates/solidcore, with its own tests. Dot and cross products, normalising, square roots or trigonometry on coordinates count, however small. - Is it a workflow recipe of kernel calls? It picks entities, parameters and defaults, sequences kernel calls, compares what they return with tolerances and reports. Then it is
solidcore/crates/solidcore-ops. Ops computes no geometric quantity of its own: when it needs one the kernel lacks, add a kernel primitive and call it. - Is it state, selection, commands, settings, history or UI? Then it is SolidCraft (
crates/,apps/), which computes no geometry.
What SolidCraft may use
solidcore-ops(modelling),solidcore-tess(display meshes, polylines) andsolidcore-record(geometry as data). CI enforces this seam throughcargo xtask layers(#13498): solidcore's public API is listed in xtask/solidcore-public.txt, and the remaining direct uses in xtask/solidcore-seam.txt, a list that only shrinks. Within those crates, xtask/solidcore-paths.txt holds each crate's count of paths into solidcore internals (#15031): a count may not go up, and a PR that removes paths lowers its line (cargo xtask layers --paths <crate>lists them). The same command keeps solidcore/ self-contained: no manifest under it may use apaththat leaves solidcore/ or depend on asolidcraft-*crate, and CI's "SolidCore builds on its own" job runscargo check --workspace --all-targets --lockedon an export of solidcore/ alone.- Before writing STEP, meshing, surface intersection, tangent chains or frames, look for solidcore's: a second implementation is flagged.
Lists that only shrink
xtask/mesh-decisions/: model decisions made from a mesh, one file each (cargo xtask mesh-decisions).solidcore/plan/panic-sites.tsv: panic-prone calls in solidcore (SolidCore checks in CI).