Li package scaffold — setup tool, skill, and docs¶
Part of the ecosystem track. Canonical
li.tomlschema and long-term UX live in 2026-05-16-li-package-manager-lip.md (§ A3). This plan covers day-one scaffolding beforelip initships in phase 8b.
Master plan ID: Pkg (prerequisite for 8a layout consistency and 8b lip init).
How this fits lip¶
| Concern | This plan (Pkg) | lip plan |
|---|---|---|
| Create directories | scripts/li-new-package | lip init wraps same script (8b) |
li.toml fields | Templates must match lip § A3 | Authoritative schema |
li.lock | Not created by scaffold (optional empty note in README) | lip install / lip add (8b) |
| Dependencies | Path placeholders in comments only | Resolve git/registry (8b–8d) |
| Publish | PUBLISH.md stub | lip publish + registry (8d) |
| Tests / coverage | Package li-tests/ smoke | lit 80% gate (8e) |
| Security | None (local files only) | ed25519 + proof_digest (8c) |
User / agent
│
▼
li-new-package ──► li.toml (§ A3) + src/ + li-tests/
│
│ (later)
▼
lip init / add / install / publish
User experience¶
./scripts/li-new-package my-math --kind library
./scripts/li-new-package my-tool --kind binary
./scripts/li-new-package my-lib --workspace packages
lip init (phase 8b) will be documented as:
Standard directory layout¶
Same tree as lip plan and li-httpd packages/ convention:
packages/my-math/
li.toml # generated from lip § A3 template
li.lock # optional; lip creates in 8b
README.md
PUBLISH.md
src/lib.li # or main.li for binary
li-tests/manifest.toml
li-tests/smoke/builds.li
Workspace root packages/li.toml:
Setup tool: scripts/li-new-package¶
| Flag | Purpose |
|---|---|
--kind library\|binary | Entry layout |
--workspace PATH | Append to [workspace].members |
--out DIR | Standalone repo (default packages/<name>) |
--dry-run | Print tree only |
--force | Overwrite existing |
Templates: scripts/templates/package/ — generated from lip § A3 (single template source file li.toml.template checked into repo).
CI: li-tests/tooling/li_new_package_smoke.sh
Agent skill¶
Path: .cursor/skills/create-li-package/SKILL.md
- Run
./scripts/li-new-package(never hand-roll dirs). - Use lip § A3 fields only in
li.toml. - Add contracts on all
defs; registerli-tests/. - Link creating-packages.md and ecosystem/overview.md.
Documentation (with lip + governance)¶
| Doc | Owner |
|---|---|
| docs/guide/creating-packages.md | Pkg + lip user path |
| docs/guide/package-layout-reference.md | Field reference → lip § A3 |
| docs/ecosystem/overview.md | Pkg vs lip vs lit diagram |
| docs/ecosystem/governance.md | Org policy, standards, traceability (summary) |
| docs/ecosystem/official-packages.md | PKG-* registry + GitHub org repos |
| docs/ecosystem/lip.md | lip plan (8b–8d) |
| 2026-05-16-li-ecosystem-governance.md | Full governance + intl standards |
| mkdocs Guide + Ecosystem nav | All above |
Per-package repo files (from governance plan): README, CHANGELOG (Keep a Changelog), LICENSE (SPDX), SECURITY.md, PUBLISH.md (PKG- id), docs/traceability.md.
CLI: --official → assign PKG- stub, print gh repo create li-langverse/<name> checklist, emit traceability template.
Exit gate (Pkg)¶
-
li-new-packageemits li.toml valid against lip § A3 (scripts/li-new-package) -
create-li-packageskill committed (incl.--official+ org checklist) - Guide + ecosystem overview + governance summary in mkdocs
-
scripts/templates/github-repo/for org repos -
docs/ecosystem/official-packages.mdstub withPKG-li-language - Smoke test in
scripts/ci.sh - lip + governance + master plan cross-linked
Not in Pkg exit gate: import, li.lock, registry (8a–8d).
Tasks¶
- Add
scripts/templates/package/from lip § A3 - Add
scripts/li-new-package li-tests/tooling/li_new_package_smoke.sh.cursor/skills/create-li-package/SKILL.mddocs/guide/creating-packages.md,docs/ecosystem/overview.md(stubs OK until execute)- Wire master plan tracker Pkg checkbox