Package System
This document specifies the current Sigil package model.
Package Identity
- package names are lowerCamel ASCII identifiers
- package versions are exact UTC timestamps in
YYYY-MM-DDTHH-mm-ssZ - direct dependencies are declared in
sigil.json.dependencies - version ranges are not part of the language surface
Package Roots
☴...is the rooted source surface for external packages☴nameis valid only whennameis a direct dependency of the current project- transitive package imports are invalid
Publishable Packages
src/package.lib.sigilis the canonical package root modulesigil.json.publishis required if and only ifsrc/package.lib.sigilexists- additional public modules are rooted beneath the package name, e.g.
☴router::matchers.segment src/flags.lib.sigilis the canonical project/package home for first-class
featureFlag declarations and may be consumed through nested public paths such as ☴featureFlagStorefrontFlags::flags.NewCheckout
Commands
The package command family is:
sigil package addsigil package installsigil package validatesigil package update [name]sigil package removesigil package listsigil package whysigil package publish
sigil package update must:
- select the newest exact direct dependency version
- rewrite
sigil.json - rewrite
sigil.lock - install resolved artifacts
- run project tests
- roll back on failure unless the user explicitly opts to keep the failing update
sigil package validate must:
- require
publishinsigil.json - reject invalid public package imports
- require passing project tests before packaging
- produce a local npm transport archive
- unpack that archive and compile the public package surface, including nested
public modules under src/
Locking and Transport
sigil.lockrecords exact resolved package artifacts- Sigil owns resolution and exactness semantics
- npm is transport only
- the canonical npm transport version is derived as
YYYYMMDD.HHMMSS.0
Public API Boundary
In v1, public package modules must not depend on transitive imports being visible to consumers. Direct-only imports are a hard user-facing rule.