Forward schema description language. Weaves design intent into physical schemas.
loom is a TypeScript-implemented schema engine that takes a design schema
(business identity, fields, value types, extension strategy) and projects it
into physical schemas (SQL DDL, atlas-yaml/v2). It is the forward-direction
complement to atlas-yaml/v2, which describes the physical fact of an existing
database.
Pre-alpha. Skeleton only — see docs/specs/2026-06-17-loom-design.md for the
validated design specification.
atlas-yaml/v2describes what a database is (physical fact, diff-stable)loom-schemadescribes what a database should be (design intent, business identity, extension strategy)- One-way projection: design → physical. Reverse is lossy and needs LLM/human
assistance (
loom lift)
See spec §"命名说明" for the etymology (loom = weaving machine; atlas = collection of maps).
loom/
packages/
core/ schema engine (pure TS, environment-agnostic)
cli/ CLI entry point (thin wrapper over core)
docs/
specs/ design specifications
pnpm install
pnpm build
pnpm test
# Run CLI directly
./packages/cli/bin/loom versionSee docs/specs/2026-06-17-loom-design.md §2 for the full decision table.
Highlights:
- Two independent layers (loom design ↔ atlas physical), one-way projection
- Sidecar EAV extension strategy — main tables never change shape for custom fields
system / module / {value_type | table | entity}file organization,base_types.yamlglobal type catalog- value types can map to multiple physical columns (Money = amount + currency)
- YAML is the AST/IR — no second source of truth
loom fmtenforces diff-stable formatting
TBD.